aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Accounts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Accounts')
-rw-r--r--lib/public/Accounts/IAccount.php24
-rw-r--r--lib/public/Accounts/IAccountManager.php93
-rw-r--r--lib/public/Accounts/IAccountProperty.php24
-rw-r--r--lib/public/Accounts/IAccountPropertyCollection.php23
-rw-r--r--lib/public/Accounts/PropertyDoesNotExistException.php23
-rw-r--r--lib/public/Accounts/UserUpdatedEvent.php23
6 files changed, 48 insertions, 162 deletions
diff --git a/lib/public/Accounts/IAccount.php b/lib/public/Accounts/IAccount.php
index 5a5c838f398..f9218f5fdf6 100644
--- a/lib/public/Accounts/IAccount.php
+++ b/lib/public/Accounts/IAccount.php
@@ -3,26 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Accounts;
@@ -40,7 +22,7 @@ interface IAccount extends \JsonSerializable {
*
* @since 15.0.0
*
- * @param string $property Must be one of the PROPERTY_ prefixed constants of \OCP\Accounts\IAccountManager
+ * @param string $property Must be one of the PROPERTY_ prefixed constants of \OCP\Accounts\IAccountManager
* @param string $value
* @param string $scope Must be one of the VISIBILITY_ prefixed constants of \OCP\Accounts\IAccountManager
* @param string $verified \OCP\Accounts\IAccountManager::NOT_VERIFIED | \OCP\Accounts\IAccountManager::VERIFICATION_IN_PROGRESS | \OCP\Accounts\IAccountManager::VERIFIED
diff --git a/lib/public/Accounts/IAccountManager.php b/lib/public/Accounts/IAccountManager.php
index fbf2d831513..ae5535ef13b 100644
--- a/lib/public/Accounts/IAccountManager.php
+++ b/lib/public/Accounts/IAccountManager.php
@@ -3,30 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Julius Härtl <jus@bitgrid.net>
- * @author Thomas Citharel <nextcloud@tcit.fr>
- * @author Vincent Petry <vincent@nextcloud.com>
- * @author Kate Döen <kate.doeen@nextcloud.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Accounts;
@@ -70,30 +48,6 @@ interface IAccountManager {
public const SCOPE_PUBLISHED = 'v2-published';
/**
- * Contact details only visible locally
- *
- * @since 15.0.0
- * @deprecated 21.0.1
- */
- public const VISIBILITY_PRIVATE = 'private';
-
- /**
- * Contact details visible on trusted federated servers.
- *
- * @since 15.0.0
- * @deprecated 21.0.1
- */
- public const VISIBILITY_CONTACTS_ONLY = 'contacts';
-
- /**
- * Contact details visible on trusted federated servers and in the public lookup server.
- *
- * @since 15.0.0
- * @deprecated 21.0.1
- */
- public const VISIBILITY_PUBLIC = 'public';
-
- /**
* The list of allowed scopes
*
* @since 25.0.0
@@ -103,9 +57,6 @@ interface IAccountManager {
self::SCOPE_LOCAL,
self::SCOPE_FEDERATED,
self::SCOPE_PUBLISHED,
- self::VISIBILITY_PRIVATE,
- self::VISIBILITY_CONTACTS_ONLY,
- self::VISIBILITY_PUBLIC,
];
/**
@@ -120,6 +71,7 @@ interface IAccountManager {
/**
* @since 27.0.0
+ * @deprecated 27.0.0 only added for backwards compatibility with provisioning_api UsersController::getCurrentUser
*/
public const PROPERTY_DISPLAYNAME_LEGACY = 'display-name';
@@ -145,10 +97,16 @@ interface IAccountManager {
/**
* @since 15.0.0
+ * @deprecated 32.0.0
*/
public const PROPERTY_TWITTER = 'twitter';
/**
+ * @since 32.0.0
+ */
+ public const PROPERTY_BLUESKY = 'bluesky';
+
+ /**
* @since 26.0.0
*/
public const PROPERTY_FEDIVERSE = 'fediverse';
@@ -179,24 +137,37 @@ interface IAccountManager {
public const PROPERTY_PROFILE_ENABLED = 'profile_enabled';
/**
+ * @since 30.0.0
+ */
+ public const PROPERTY_BIRTHDATE = 'birthdate';
+
+ /**
+ * @since 31.0.0
+ */
+ public const PROPERTY_PRONOUNS = 'pronouns';
+
+ /**
* The list of allowed properties
*
* @since 25.0.0
*/
public const ALLOWED_PROPERTIES = [
+ self::PROPERTY_ADDRESS,
self::PROPERTY_AVATAR,
+ self::PROPERTY_BIOGRAPHY,
+ self::PROPERTY_BIRTHDATE,
self::PROPERTY_DISPLAYNAME,
- self::PROPERTY_PHONE,
self::PROPERTY_EMAIL,
- self::PROPERTY_WEBSITE,
- self::PROPERTY_ADDRESS,
- self::PROPERTY_TWITTER,
self::PROPERTY_FEDIVERSE,
- self::PROPERTY_ORGANISATION,
- self::PROPERTY_ROLE,
self::PROPERTY_HEADLINE,
- self::PROPERTY_BIOGRAPHY,
+ self::PROPERTY_ORGANISATION,
+ self::PROPERTY_PHONE,
self::PROPERTY_PROFILE_ENABLED,
+ self::PROPERTY_PRONOUNS,
+ self::PROPERTY_ROLE,
+ self::PROPERTY_TWITTER,
+ self::PROPERTY_BLUESKY,
+ self::PROPERTY_WEBSITE,
];
@@ -244,9 +215,9 @@ interface IAccountManager {
* Search for users based on account data
*
* @param string $property - property or property collection name – since
- * NC 22 the implementation MAY add a fitting property collection into the
- * search even if a property name was given e.g. email property and email
- * collection)
+ * NC 22 the implementation MAY add a fitting property collection into the
+ * search even if a property name was given e.g. email property and email
+ * collection)
* @param string[] $values
* @return array
*
diff --git a/lib/public/Accounts/IAccountProperty.php b/lib/public/Accounts/IAccountProperty.php
index 82a83e8948a..c9d05bfb6ca 100644
--- a/lib/public/Accounts/IAccountProperty.php
+++ b/lib/public/Accounts/IAccountProperty.php
@@ -3,26 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Accounts;
@@ -50,6 +32,7 @@ interface IAccountProperty extends \JsonSerializable {
* @since 15.0.0
*
* @param string $scope
+ * @psalm-param IAccountManager::SCOPE_* $scope
* @return IAccountProperty
* @throws InvalidArgumentException (since 22.0.0)
*/
@@ -89,6 +72,7 @@ interface IAccountProperty extends \JsonSerializable {
* @since 15.0.0
*
* @return string
+ * @psalm-return IAccountManager::SCOPE_*
*/
public function getScope(): string;
diff --git a/lib/public/Accounts/IAccountPropertyCollection.php b/lib/public/Accounts/IAccountPropertyCollection.php
index c4ae5b5abc0..8fde9781d1f 100644
--- a/lib/public/Accounts/IAccountPropertyCollection.php
+++ b/lib/public/Accounts/IAccountPropertyCollection.php
@@ -1,29 +1,10 @@
<?php
declare(strict_types=1);
-
/**
- * @copyright Copyright (c) 2021 Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\Accounts;
use InvalidArgumentException;
diff --git a/lib/public/Accounts/PropertyDoesNotExistException.php b/lib/public/Accounts/PropertyDoesNotExistException.php
index 0ce3f1b069b..1d27ef1df30 100644
--- a/lib/public/Accounts/PropertyDoesNotExistException.php
+++ b/lib/public/Accounts/PropertyDoesNotExistException.php
@@ -1,25 +1,8 @@
<?php
+
/**
- * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Accounts;
diff --git a/lib/public/Accounts/UserUpdatedEvent.php b/lib/public/Accounts/UserUpdatedEvent.php
index e6c73f1d1c1..fe9ea62a302 100644
--- a/lib/public/Accounts/UserUpdatedEvent.php
+++ b/lib/public/Accounts/UserUpdatedEvent.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2023 Joas Schilling <coding@schilljs.com>
- *
- * @author Joas Schilling <coding@schilljs.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Accounts;
@@ -29,6 +12,8 @@ use OCP\EventDispatcher\Event;
use OCP\IUser;
/**
+ * This event is triggered when the account data of a user was updated.
+ *
* @since 28.0.0
*/
class UserUpdatedEvent extends Event {