Update ldap.php
This commit is contained in:
parent
ac384790e4
commit
89ce56e3ac
|
|
@ -84,7 +84,7 @@ class plugin_ldap {
|
||||||
if ($user_authorized) {
|
if ($user_authorized) {
|
||||||
$sql = "select * from v_users ";
|
$sql = "select * from v_users ";
|
||||||
$sql .= "where username=:username ";
|
$sql .= "where username=:username ";
|
||||||
if ($_SESSION["user"]["unique"]["text"] == "global") {
|
if ($_SESSION["users"]["unique"]["text"] == "global") {
|
||||||
//unique username - global (example: email address)
|
//unique username - global (example: email address)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -92,7 +92,7 @@ class plugin_ldap {
|
||||||
$sql .= "and domain_uuid=:domain_uuid ";
|
$sql .= "and domain_uuid=:domain_uuid ";
|
||||||
}
|
}
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$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(':domain_uuid', $this->domain_uuid);
|
||||||
}
|
}
|
||||||
$prep_statement->bindParam(':username', $this->username);
|
$prep_statement->bindParam(':username', $this->username);
|
||||||
|
|
@ -100,7 +100,7 @@ class plugin_ldap {
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
if (count($result) > 0) {
|
if (count($result) > 0) {
|
||||||
foreach ($result as &$row) {
|
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
|
//get the domain uuid
|
||||||
$this->domain_uuid = $row["domain_uuid"];
|
$this->domain_uuid = $row["domain_uuid"];
|
||||||
$this->domain_name = $_SESSION['domains'][$this->domain_uuid]['domain_name'];
|
$this->domain_name = $_SESSION['domains'][$this->domain_uuid]['domain_name'];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue