]> source.dussan.org Git - nextcloud-server.git/commitdiff
FIx stable21 difference 26815/head
authorJoas Schilling <coding@schilljs.com>
Thu, 29 Apr 2021 06:19:20 +0000 (08:19 +0200)
committerJoas Schilling <coding@schilljs.com>
Thu, 29 Apr 2021 06:19:20 +0000 (08:19 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/provisioning_api/lib/Controller/UsersController.php

index 2c7b762fc73b05c0747e7023559dcb515e0de230..b6b9efb078b484ff8d186e7b15ad0144747f7779 100644 (file)
@@ -71,6 +71,7 @@ use OCP\L10N\IFactory;
 use OCP\Security\ISecureRandom;
 use OCP\Security\Events\GenerateSecurePasswordEvent;
 use OCP\EventDispatcher\IEventDispatcher;
+use OCP\User\Backend\ISetDisplayNameBackend;
 
 class UsersController extends AUserData {
 
@@ -533,7 +534,7 @@ class UsersController extends AUserData {
        public function getEditableFields(?string $userId = null): DataResponse {
                $currentLoggedInUser = $this->userSession->getUser();
                if (!$currentLoggedInUser instanceof IUser) {
-                       throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
+                       throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
                }
 
                $permittedFields = [];
@@ -541,13 +542,13 @@ class UsersController extends AUserData {
                if ($userId !== $currentLoggedInUser->getUID()) {
                        $targetUser = $this->userManager->get($userId);
                        if (!$targetUser instanceof IUser) {
-                               throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
+                               throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
                        }
 
                        $subAdminManager = $this->groupManager->getSubAdmin();
                        if (!$this->groupManager->isAdmin($currentLoggedInUser->getUID())
                                && !$subAdminManager->isUserAccessible($currentLoggedInUser, $targetUser)) {
-                               throw new OCSException('', OCSController::RESPOND_NOT_FOUND);
+                               throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
                        }
                } else {
                        $targetUser = $currentLoggedInUser;