From df38d4ef1a591bd5b1aaa476b6240eac0a059a8e Mon Sep 17 00:00:00 2001 From: tomneedham Date: Tue, 18 Feb 2014 10:36:18 +0000 Subject: Return 101 if user doesnt exist --- lib/private/ocs/cloud.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') 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); -- cgit v1.2.3