Return 101 if user doesnt exist

This commit is contained in:
tomneedham 2014-02-18 10:36:18 +00:00
parent 2f1a24eee7
commit df38d4ef1a

View file

@ -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);