diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2013-11-25 22:05:00 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2013-11-25 22:05:00 +0100 |
commit | 3955388f204d58dddbd3f787d66f570a0f61855b (patch) | |
tree | 293fb829ac315b3dc78101e4511d17b112f8c33a /apps/user_ldap/group_proxy.php | |
parent | d9347f2c9b1411a06a742e45702d6c27d7a2d1b4 (diff) | |
download | nextcloud-server-3955388f204d58dddbd3f787d66f570a0f61855b.tar.gz nextcloud-server-3955388f204d58dddbd3f787d66f570a0f61855b.zip |
LDAP: proxy: configurable return to determine when to try the next LDAP server and when to return (multi server setup)
Diffstat (limited to 'apps/user_ldap/group_proxy.php')
-rw-r--r-- | apps/user_ldap/group_proxy.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/user_ldap/group_proxy.php b/apps/user_ldap/group_proxy.php index acc563c9532..4404bd7fe3a 100644 --- a/apps/user_ldap/group_proxy.php +++ b/apps/user_ldap/group_proxy.php @@ -67,16 +67,17 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface { * @param $gid string, the gid connected to the request * @param $method string, the method of the group backend that shall be called * @param $parameters an array of parameters to be passed + * @param $passOnWhen the result matches this variable * @return mixed, the result of the method or false */ - protected function callOnLastSeenOn($gid, $method, $parameters) { + protected function callOnLastSeenOn($gid, $method, $parameters, $passOnWhen) { $cacheKey = $this->getGroupCacheKey($gid);; $prefix = $this->getFromCache($cacheKey); //in case the uid has been found in the past, try this stored connection first if(!is_null($prefix)) { if(isset($this->backends[$prefix])) { $result = call_user_func_array(array($this->backends[$prefix], $method), $parameters); - if(!$result) { + if($result === $passOnWhen) { //not found here, reset cache to null if group vanished //because sometimes methods return false with a reason $groupExists = call_user_func_array( |