summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php2
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php2
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