mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
LDAP authentication adjust the username remove the @ domain_name as part of the username.
This commit is contained in:
@@ -84,12 +84,11 @@ session_start();
|
||||
if ($_SESSION["ldap"]["authentication"]["text"] == "true") {
|
||||
if (strlen(check_str($_REQUEST["domain_name"])) > 0) {
|
||||
$domain_name = check_str($_REQUEST["domain_name"]);
|
||||
$username .= "@".$domain_name;
|
||||
}
|
||||
$ad = ldap_connect("ldap://".$_SESSION["ldap"]["server_host"]["text"].":".$_SESSION["ldap"]["server_port"]["numeric"])
|
||||
or die("Couldn't connect to AD!");
|
||||
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||
$bd = ldap_bind($ad,$username,check_str($_REQUEST["password"]));
|
||||
$bd = ldap_bind($ad,$username."@".$domain_name,check_str($_REQUEST["password"]));
|
||||
if ($bd) {
|
||||
//echo "success\n";
|
||||
$auth_failed = false;
|
||||
|
||||
Reference in New Issue
Block a user