diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-21 11:30:00 -0500 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-21 11:30:00 -0500 |
commit | 4dd72e9eb9128c873356023eb6c5f1a829745f25 (patch) | |
tree | d3708a43c2cc803a893c37e38e0fc74c7d0b863f /apps | |
parent | 9a0280f1c8575f3ef1a76501fae9801d8a45fe6f (diff) | |
download | nextcloud-server-4dd72e9eb9128c873356023eb6c5f1a829745f25.tar.gz nextcloud-server-4dd72e9eb9128c873356023eb6c5f1a829745f25.zip |
Use RESPOND_NOT_FOUND for non existing user
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 2 | ||||
-rw-r--r-- | apps/provisioning_api/tests/Controller/UsersControllerTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index d2aeac540d2..b1a1cf1c6b7 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -790,7 +790,7 @@ class UsersController extends OCSController { $targetUser = $this->userManager->get($userId); if($targetUser === null) { - throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED); + throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND); } // Check if admin / subadmin diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 1d1cd97b6d2..2eb3853d333 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -2707,7 +2707,7 @@ class UsersControllerTest extends TestCase { /** * @expectedException \OCP\AppFramework\OCS\OCSException - * @expectedExceptionCode 997 + * @expectedExceptionCode 998 */ public function testResendWelcomeMessageWithNotExistingTargetUser() { $this->userManager |