Change the rest of the $ds variables to $ldap_connection

This commit is contained in:
Tony Murray
2016-06-03 22:16:10 -05:00
parent 9b0bd4c15a
commit bf471698ef
3 changed files with 18 additions and 18 deletions

View File

@@ -1,11 +1,11 @@
<?php
$ds = @ldap_connect($config['auth_ldap_server'], $config['auth_ldap_port']);
$ldap_connection = @ldap_connect($config['auth_ldap_server'], $config['auth_ldap_port']);
if ($config['auth_ldap_starttls'] && ($config['auth_ldap_starttls'] == 'optional' || $config['auth_ldap_starttls'] == 'require')) {
$tls = ldap_start_tls($ds);
$tls = ldap_start_tls($ldap_connection);
if ($config['auth_ldap_starttls'] == 'require' && $tls === false) {
echo '<h2>Fatal error: LDAP TLS required but not successfully negotiated:'.ldap_error($ds).'</h2>';
echo '<h2>Fatal error: LDAP TLS required but not successfully negotiated:'.ldap_error($ldap_connection).'</h2>';
exit;
}
}