diff options
author | tomneedham <tom@owncloud.com> | 2014-02-18 10:36:18 +0000 |
---|---|---|
committer | tomneedham <tom@owncloud.com> | 2014-02-18 10:36:18 +0000 |
commit | df38d4ef1a591bd5b1aaa476b6240eac0a059a8e (patch) | |
tree | ae57d4516c4656b0a9bd4044faa351111ffc1abd /lib | |
parent | 2f1a24eee74d0bf7bf5d734d1abd99a7bc68052c (diff) | |
download | nextcloud-server-df38d4ef1a591bd5b1aaa476b6240eac0a059a8e.tar.gz nextcloud-server-df38d4ef1a591bd5b1aaa476b6240eac0a059a8e.zip |
Return 101 if user doesnt exist
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/ocs/cloud.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/ocs/cloud.php b/lib/private/ocs/cloud.php index 784a5b0869e..06d6a8eb4b0 100644 --- a/lib/private/ocs/cloud.php +++ b/lib/private/ocs/cloud.php @@ -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); |