Updated ldap_connect to use modern LDAP schema for better TLS support.
This commit is contained in:
parent
63e78d840d
commit
7e0e0db384
1 changed files with 4 additions and 1 deletions
|
@ -35,7 +35,10 @@ abstract class AuthController extends Controller
|
|||
return false;
|
||||
}
|
||||
|
||||
$server = ldap_connect($this->config['ldap']['host'], $this->config['ldap']['port']);
|
||||
$ldapSchema=array_key_exists('schema', $this->config['ldap']) ?
|
||||
strtolower($this->config['ldap']['schema']) : 'ldap';
|
||||
$ldapURI="$ldapSchema://".$this->config['ldap']['host'].':'.$this->config['ldap']['port'];
|
||||
$server = ldap_connect($ldapURI);
|
||||
|
||||
if ($server) {
|
||||
ldap_set_option($server, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||
|
|
Loading…
Add table
Reference in a new issue