Commit ea8110b8 authored by Clément OUDOT's avatar Clément OUDOT

feat(failover) allow to define multiple LDAP servers in a referral URI

Set Admin DN and Admin Password with server URL different that the one registered in REFERRAL array

references #5752
parent e2d13694
......@@ -381,7 +381,7 @@ class config
/* Parse LDAP referral informations */
if (!isset($this->current['ADMINDN']) || !isset($this->current['ADMINPASSWORD'])) {
$url = $this->current['SERVER'];
$referral = $this->current['REFERRAL'][$url];
$referral = $this->current['REFERRAL'][$url] ? $this->current['REFERRAL'][$url] : array_shift($this->current['REFERRAL']);
$this->current['ADMINDN'] = $referral['ADMINDN'];
$this->current['ADMINPASSWORD'] = $referral['ADMINPASSWORD'];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment