Use RESPOND_NOT_FOUND for non existing user

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-04-21 11:30:00 -05:00
parent 9a0280f1c8
commit 4dd72e9eb9
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with 2 additions and 2 deletions

View File

@ -790,7 +790,7 @@ class UsersController extends OCSController {
$targetUser = $this->userManager->get($userId); $targetUser = $this->userManager->get($userId);
if($targetUser === null) { if($targetUser === null) {
throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED); throw new OCSException('', \OCP\API::RESPOND_NOT_FOUND);
} }
// Check if admin / subadmin // Check if admin / subadmin

View File

@ -2707,7 +2707,7 @@ class UsersControllerTest extends TestCase {
/** /**
* @expectedException \OCP\AppFramework\OCS\OCSException * @expectedException \OCP\AppFramework\OCS\OCSException
* @expectedExceptionCode 997 * @expectedExceptionCode 998
*/ */
public function testResendWelcomeMessageWithNotExistingTargetUser() { public function testResendWelcomeMessageWithNotExistingTargetUser() {
$this->userManager $this->userManager