Update ldap.php

This commit is contained in:
FusionPBX 2019-07-29 10:33:27 -06:00 committed by GitHub
parent ac384790e4
commit 89ce56e3ac
1 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class plugin_ldap {
if ($user_authorized) {
$sql = "select * from v_users ";
$sql .= "where username=:username ";
if ($_SESSION["user"]["unique"]["text"] == "global") {
if ($_SESSION["users"]["unique"]["text"] == "global") {
//unique username - global (example: email address)
}
else {
@ -92,7 +92,7 @@ class plugin_ldap {
$sql .= "and domain_uuid=:domain_uuid ";
}
$prep_statement = $db->prepare(check_sql($sql));
if ($_SESSION["user"]["unique"]["text"] != "global") {
if ($_SESSION["users"]["unique"]["text"] != "global") {
$prep_statement->bindParam(':domain_uuid', $this->domain_uuid);
}
$prep_statement->bindParam(':username', $this->username);
@ -100,7 +100,7 @@ class plugin_ldap {
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if (count($result) > 0) {
foreach ($result as &$row) {
if ($_SESSION["user"]["unique"]["text"] == "global" && $row["domain_uuid"] != $this->domain_uuid) {
if ($_SESSION["users"]["unique"]["text"] == "global" && $row["domain_uuid"] != $this->domain_uuid) {
//get the domain uuid
$this->domain_uuid = $row["domain_uuid"];
$this->domain_name = $_SESSION['domains'][$this->domain_uuid]['domain_name'];