aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/User/Backend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/User/Backend')
-rw-r--r--lib/public/User/Backend/ABackend.php24
-rw-r--r--lib/public/User/Backend/ICheckPasswordBackend.php24
-rw-r--r--lib/public/User/Backend/ICountMappedUsersBackend.php22
-rw-r--r--lib/public/User/Backend/ICountUsersBackend.php25
-rw-r--r--lib/public/User/Backend/ICreateUserBackend.php22
-rw-r--r--lib/public/User/Backend/ICustomLogout.php21
-rw-r--r--lib/public/User/Backend/IGetDisplayNameBackend.php22
-rw-r--r--lib/public/User/Backend/IGetHomeBackend.php22
-rw-r--r--lib/public/User/Backend/IGetRealUIDBackend.php25
-rw-r--r--lib/public/User/Backend/ILimitAwareCountUsersBackend.php23
-rw-r--r--lib/public/User/Backend/IPasswordConfirmationBackend.php22
-rw-r--r--lib/public/User/Backend/IPasswordHashBackend.php30
-rw-r--r--lib/public/User/Backend/IProvideAvatarBackend.php22
-rw-r--r--lib/public/User/Backend/IProvideEnabledStateBackend.php40
-rw-r--r--lib/public/User/Backend/ISearchKnownUsersBackend.php22
-rw-r--r--lib/public/User/Backend/ISetDisplayNameBackend.php25
-rw-r--r--lib/public/User/Backend/ISetPasswordBackend.php22
17 files changed, 149 insertions, 264 deletions
diff --git a/lib/public/User/Backend/ABackend.php b/lib/public/User/Backend/ABackend.php
index dff705e0806..2fca83e3be8 100644
--- a/lib/public/User/Backend/ABackend.php
+++ b/lib/public/User/Backend/ABackend.php
@@ -3,26 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -34,9 +16,9 @@ use OCP\UserInterface;
* @since 14.0.0
*/
abstract class ABackend implements IUserBackend, UserInterface {
-
/**
* @deprecated 14.0.0
+ * @since 14.0.0
*
* @param int $actions The action to check for
* @return bool
diff --git a/lib/public/User/Backend/ICheckPasswordBackend.php b/lib/public/User/Backend/ICheckPasswordBackend.php
index b3eaf7cedb0..db5d7d08cb5 100644
--- a/lib/public/User/Backend/ICheckPasswordBackend.php
+++ b/lib/public/User/Backend/ICheckPasswordBackend.php
@@ -3,26 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -35,7 +17,7 @@ interface ICheckPasswordBackend {
*
* @param string $loginName The loginname
* @param string $password The password
- * @return string|bool The uid on success false on failure
+ * @return string|false The uid on success false on failure
*/
public function checkPassword(string $loginName, string $password);
}
diff --git a/lib/public/User/Backend/ICountMappedUsersBackend.php b/lib/public/User/Backend/ICountMappedUsersBackend.php
new file mode 100644
index 00000000000..39f84f74f4a
--- /dev/null
+++ b/lib/public/User/Backend/ICountMappedUsersBackend.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\User\Backend;
+
+/**
+ * @since 24.0.7
+ */
+interface ICountMappedUsersBackend {
+ /**
+ * @since 24.0.7
+ *
+ * @return int The number of users already mapped to a Nextcloud account
+ */
+ public function countMappedUsers(): int;
+}
diff --git a/lib/public/User/Backend/ICountUsersBackend.php b/lib/public/User/Backend/ICountUsersBackend.php
index 52f947a654d..194cf465cbe 100644
--- a/lib/public/User/Backend/ICountUsersBackend.php
+++ b/lib/public/User/Backend/ICountUsersBackend.php
@@ -3,37 +3,20 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
/**
* @since 14.0.0
+ * @deprecated 31.0.0 use and implement ILimitAwareCountUsersBackend instead.
*/
interface ICountUsersBackend {
-
/**
* @since 14.0.0
*
- * @return int|bool The number of users on success false on failure
+ * @return int|false The number of users on success false on failure
*/
public function countUsers();
}
diff --git a/lib/public/User/Backend/ICreateUserBackend.php b/lib/public/User/Backend/ICreateUserBackend.php
index a33cec58010..f273c6d7f8b 100644
--- a/lib/public/User/Backend/ICreateUserBackend.php
+++ b/lib/public/User/Backend/ICreateUserBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -29,7 +12,6 @@ namespace OCP\User\Backend;
* @since 14.0.0
*/
interface ICreateUserBackend {
-
/**
* @since 14.0.0
*
diff --git a/lib/public/User/Backend/ICustomLogout.php b/lib/public/User/Backend/ICustomLogout.php
index ec104d5ef42..6d0f03387ce 100644
--- a/lib/public/User/Backend/ICustomLogout.php
+++ b/lib/public/User/Backend/ICustomLogout.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\User\Backend;
diff --git a/lib/public/User/Backend/IGetDisplayNameBackend.php b/lib/public/User/Backend/IGetDisplayNameBackend.php
index 1c3ed287f37..a9c92b8b146 100644
--- a/lib/public/User/Backend/IGetDisplayNameBackend.php
+++ b/lib/public/User/Backend/IGetDisplayNameBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -29,7 +12,6 @@ namespace OCP\User\Backend;
* @since 14.0.0
*/
interface IGetDisplayNameBackend {
-
/**
* @since 14.0.0
*
diff --git a/lib/public/User/Backend/IGetHomeBackend.php b/lib/public/User/Backend/IGetHomeBackend.php
index 45ef5b6b215..f280f4c9370 100644
--- a/lib/public/User/Backend/IGetHomeBackend.php
+++ b/lib/public/User/Backend/IGetHomeBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -29,7 +12,6 @@ namespace OCP\User\Backend;
* @since 14.0.0
*/
interface IGetHomeBackend {
-
/**
* @since 14.0.0
*
diff --git a/lib/public/User/Backend/IGetRealUIDBackend.php b/lib/public/User/Backend/IGetRealUIDBackend.php
index 5d618b294d9..8041043f7d5 100644
--- a/lib/public/User/Backend/IGetRealUIDBackend.php
+++ b/lib/public/User/Backend/IGetRealUIDBackend.php
@@ -3,26 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Joas Schilling <coding@schilljs.com>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\User\Backend;
@@ -30,13 +12,12 @@ namespace OCP\User\Backend;
* @since 17.0.0
*/
interface IGetRealUIDBackend {
-
/**
* Some backends accept different UIDs than what is the internal UID to be used.
* For example the database backend accepts different cased UIDs in all the functions
* but the internal UID that is to be used should be correctly cased.
*
- * This little function makes sure that the used UID will be correct hen using the user object
+ * This little function makes sure that the used UID will be correct when using the user object
*
* @since 17.0.0
* @param string $uid
diff --git a/lib/public/User/Backend/ILimitAwareCountUsersBackend.php b/lib/public/User/Backend/ILimitAwareCountUsersBackend.php
new file mode 100644
index 00000000000..a59c0bd8e04
--- /dev/null
+++ b/lib/public/User/Backend/ILimitAwareCountUsersBackend.php
@@ -0,0 +1,23 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\User\Backend;
+
+/**
+ * @since 31.0.0
+ */
+interface ILimitAwareCountUsersBackend extends ICountUsersBackend {
+ /**
+ * @since 31.0.0
+ *
+ * @param int $limit Limit to stop counting users if there are more than $limit. 0 to disable limiting.
+ * @return int|false The number of users (may be limited to $limit) on success false on failure
+ */
+ public function countUsers(int $limit = 0): int|false;
+}
diff --git a/lib/public/User/Backend/IPasswordConfirmationBackend.php b/lib/public/User/Backend/IPasswordConfirmationBackend.php
index 3c6d14c3f1d..856f65ada00 100644
--- a/lib/public/User/Backend/IPasswordConfirmationBackend.php
+++ b/lib/public/User/Backend/IPasswordConfirmationBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -29,7 +12,6 @@ namespace OCP\User\Backend;
* @since 15.0.0
*/
interface IPasswordConfirmationBackend {
-
/**
* @since 15.0.0
*/
diff --git a/lib/public/User/Backend/IPasswordHashBackend.php b/lib/public/User/Backend/IPasswordHashBackend.php
new file mode 100644
index 00000000000..2525b4e45ea
--- /dev/null
+++ b/lib/public/User/Backend/IPasswordHashBackend.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\User\Backend;
+
+use InvalidArgumentException;
+
+/**
+ * @since 30.0.0
+ */
+interface IPasswordHashBackend {
+ /**
+ * @return ?string the password hash hashed by `\OCP\Security\IHasher::hash()`
+ * @since 30.0.0
+ */
+ public function getPasswordHash(string $userId): ?string;
+
+ /**
+ * @param string $passwordHash the password hash hashed by `\OCP\Security\IHasher::hash()`
+ * @throws InvalidArgumentException when `$passwordHash` is not a valid hash
+ * @since 30.0.0
+ */
+ public function setPasswordHash(string $userId, string $passwordHash): bool;
+}
diff --git a/lib/public/User/Backend/IProvideAvatarBackend.php b/lib/public/User/Backend/IProvideAvatarBackend.php
index fe4bb841f72..6a694a4de95 100644
--- a/lib/public/User/Backend/IProvideAvatarBackend.php
+++ b/lib/public/User/Backend/IProvideAvatarBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -29,7 +12,6 @@ namespace OCP\User\Backend;
* @since 14.0.0
*/
interface IProvideAvatarBackend {
-
/**
* @since 14.0.0
*
diff --git a/lib/public/User/Backend/IProvideEnabledStateBackend.php b/lib/public/User/Backend/IProvideEnabledStateBackend.php
new file mode 100644
index 00000000000..5dcee366e53
--- /dev/null
+++ b/lib/public/User/Backend/IProvideEnabledStateBackend.php
@@ -0,0 +1,40 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCP\User\Backend;
+
+/**
+ * @since 28.0.0
+ */
+interface IProvideEnabledStateBackend {
+ /**
+ * @since 28.0.0
+ *
+ * @param callable():bool $queryDatabaseValue A callable to query the enabled state from database
+ */
+ public function isUserEnabled(string $uid, callable $queryDatabaseValue): bool;
+
+ /**
+ * @since 28.0.0
+ *
+ * @param callable():bool $queryDatabaseValue A callable to query the enabled state from database
+ * @param callable(bool):void $setDatabaseValue A callable to set the enabled state in the database.
+ */
+ public function setUserEnabled(string $uid, bool $enabled, callable $queryDatabaseValue, callable $setDatabaseValue): bool;
+
+ /**
+ * Get the list of disabled users, to merge with the ones disabled in database
+ *
+ * @since 28.0.0
+ * @since 30.0.0 $search parameter added
+ *
+ * @return string[]
+ */
+ public function getDisabledUserList(?int $limit = null, int $offset = 0, string $search = ''): array;
+}
diff --git a/lib/public/User/Backend/ISearchKnownUsersBackend.php b/lib/public/User/Backend/ISearchKnownUsersBackend.php
index 60a147dc62c..4b3eef6005f 100644
--- a/lib/public/User/Backend/ISearchKnownUsersBackend.php
+++ b/lib/public/User/Backend/ISearchKnownUsersBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2021 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: 2021 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\User\Backend;
@@ -29,7 +12,6 @@ namespace OCP\User\Backend;
* @since 21.0.1
*/
interface ISearchKnownUsersBackend {
-
/**
* @param string $searcher
* @param string $pattern
diff --git a/lib/public/User/Backend/ISetDisplayNameBackend.php b/lib/public/User/Backend/ISetDisplayNameBackend.php
index 922d356bfd7..617f1735021 100644
--- a/lib/public/User/Backend/ISetDisplayNameBackend.php
+++ b/lib/public/User/Backend/ISetDisplayNameBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -29,13 +12,15 @@ namespace OCP\User\Backend;
* @since 14.0.0
*/
interface ISetDisplayNameBackend {
-
/**
* @since 14.0.0
*
* @param string $uid The username
* @param string $displayName The new display name
* @return bool
+ *
+ * @since 25.0.0 Throw InvalidArgumentException
+ * @throws \InvalidArgumentException
*/
public function setDisplayName(string $uid, string $displayName): bool;
}
diff --git a/lib/public/User/Backend/ISetPasswordBackend.php b/lib/public/User/Backend/ISetPasswordBackend.php
index 2ba992286ec..571349df58f 100644
--- a/lib/public/User/Backend/ISetPasswordBackend.php
+++ b/lib/public/User/Backend/ISetPasswordBackend.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018 Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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\User\Backend;
@@ -29,7 +12,6 @@ namespace OCP\User\Backend;
* @since 14.0.0
*/
interface ISetPasswordBackend {
-
/**
* @since 14.0.0
*