Use RESPOND_NOT_FOUND for non existing user
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
9a0280f1c8
commit
4dd72e9eb9
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -2707,7 +2707,7 @@ class UsersControllerTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @expectedException \OCP\AppFramework\OCS\OCSException
|
||||
* @expectedExceptionCode 997
|
||||
* @expectedExceptionCode 998
|
||||
*/
|
||||
public function testResendWelcomeMessageWithNotExistingTargetUser() {
|
||||
$this->userManager
|
||||
|
|
Loading…
Reference in a new issue