[Pkg-owncloud-commits] [owncloud] 218/394: Add an $excludingBackend optional parameter
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:12:09 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit f2eef0ccf8b471c5f84400ee8e6902c199de4911
Author: Lorenzo M. Catucci <lorenzo at sancho.ccd.uniroma2.it>
Date: Thu Dec 6 18:09:47 2012 +0100
Add an $excludingBackend optional parameter
to the userExists method both in OCP\User and in OC_User.
---
lib/public/user.php | 6 +++---
lib/user.php | 7 ++++++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/public/user.php b/lib/public/user.php
index b320ce8..9e50115 100644
--- a/lib/public/user.php
+++ b/lib/public/user.php
@@ -65,12 +65,12 @@ class User {
/**
* @brief check if a user exists
* @param string $uid the username
+ * @param string $excludingBackend (default none)
* @return boolean
*/
- public static function userExists( $uid ) {
- return \OC_USER::userExists( $uid );
+ public static function userExists( $uid, $excludingBackend = null ) {
+ return \OC_USER::userExists( $uid, $excludingBackend );
}
-
/**
* @brief Loggs the user out including all the session data
* @returns true
diff --git a/lib/user.php b/lib/user.php
index 33c756f..42116fa 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -405,10 +405,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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list