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/lib/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/lib/proxy.php')
-rw-r--r-- | apps/user_ldap/lib/proxy.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/proxy.php b/apps/user_ldap/lib/proxy.php index c74b357bdd2..30e1875901c 100644 --- a/apps/user_ldap/lib/proxy.php +++ b/apps/user_ldap/lib/proxy.php @@ -54,7 +54,7 @@ abstract class Proxy { return 'group-'.$gid.'-lastSeenOn'; } - abstract protected function callOnLastSeenOn($id, $method, $parameters); + abstract protected function callOnLastSeenOn($id, $method, $parameters, $passOnWhen); abstract protected function walkBackends($id, $method, $parameters); /** @@ -64,8 +64,9 @@ abstract class Proxy { * @param $parameters an array of parameters to be passed * @return mixed, the result of the specified method */ - protected function handleRequest($id, $method, $parameters) { - if(!$result = $this->callOnLastSeenOn($id, $method, $parameters)) { + protected function handleRequest($id, $method, $parameters, $passOnWhen = false) { + $result = $this->callOnLastSeenOn($id, $method, $parameters, $passOnWhen); + if($result === $passOnWhen) { $result = $this->walkBackends($id, $method, $parameters); } return $result; |