From 15afbfd198f9f54cee8717776b4f45f73d9b1cbf Mon Sep 17 00:00:00 2001 From: "Lorenzo M. Catucci" Date: Thu, 6 Dec 2012 18:09:47 +0100 Subject: Add an $excludingBackend optional parameter to the userExists method both in OCP\User and in OC_User. --- lib/user.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/user.php') diff --git a/lib/user.php b/lib/user.php index 31c93740d77..d55c6165a09 100644 --- a/lib/user.php +++ b/lib/user.php @@ -407,10 +407,15 @@ class OC_User { /** * @brief check if a user exists * @param string $uid the username + * @param string $excludingBackend (default none) * @return boolean */ - public static function userExists($uid) { + public static function userExists($uid, $excludingBackend=null) { foreach(self::$_usedBackends as $backend) { + if (!is_null($excludingBackend) && !strcmp(get_class($backend),$excludingBackend)) { + OC_Log::write('OC_User', $excludingBackend . 'excluded from user existance check.', OC_Log::DEBUG); + continue; + } $result=$backend->userExists($uid); if($result===true) { return true; -- cgit v1.2.3