Return 101 if user doesnt exist
This commit is contained in:
parent
2f1a24eee7
commit
df38d4ef1a
1 changed files with 6 additions and 2 deletions
|
@ -75,8 +75,12 @@ class OC_OCS_Cloud {
|
|||
}
|
||||
if(OC_User::isAdminUser(OC_User::getUser())
|
||||
|| OC_Subadmin::isUserAccessible(OC_User::getUser(), $parameters['userid'])) {
|
||||
// Is an admin/subadmin so can see display name
|
||||
$return['displayname'] = OC_User::getDisplayName($parameters['userid']);
|
||||
if(OC_User::userExists($parameters['userid'])) {
|
||||
// Is an admin/subadmin so can see display name
|
||||
$return['displayname'] = OC_User::getDisplayName($parameters['userid']);
|
||||
} else {
|
||||
return new OC_OCS_Result(null, 101);
|
||||
}
|
||||
}
|
||||
if(count($return)) {
|
||||
return new OC_OCS_Result($return);
|
||||
|
|
Loading…
Reference in a new issue