Private GIT

Skip to content
Snippets Groups Projects
Commit bf6676c6 authored by qgarnier's avatar qgarnier Committed by Kev
Browse files

Ref #4867

parent e3df0899
Branches
Tags
No related merge requests found
...@@ -272,8 +272,8 @@ class CentreonAuthLDAP ...@@ -272,8 +272,8 @@ class CentreonAuthLDAP
$this->CentreonLog->insertLog(3, "LDAP AUTH : Update user DN for user " . $this->CentreonLog->insertLog(3, "LDAP AUTH : Update user DN for user " .
html_entity_decode($this->contactInfos['contact_alias'], ENT_QUOTES, 'UTF-8')); html_entity_decode($this->contactInfos['contact_alias'], ENT_QUOTES, 'UTF-8'));
$queryUpdateExtInfos = "UPDATE contact SET $queryUpdateExtInfos = "UPDATE contact SET
contact_ldap_dn = '" . $this->pearDB->escape($userDn, false) . "', contact_ldap_dn = '" . $this->pearDB->escape($userDn) . "',
contact_name = '" . $this->pearDB->escape($userDisplay, false) . "', contact_name = '" . $this->pearDB->escape($userDisplay) . "',
contact_email = " . $userEmail . ", contact_email = " . $userEmail . ",
contact_pager = " . $userPager . ", contact_pager = " . $userPager . ",
ar_id = ".$this->arId." ar_id = ".$this->arId."
...@@ -313,7 +313,7 @@ class CentreonAuthLDAP ...@@ -313,7 +313,7 @@ class CentreonAuthLDAP
contact_enable_notifications) contact_enable_notifications)
VALUES (" . $tmplId . ", '" . VALUES (" . $tmplId . ", '" .
$this->contactInfos['contact_alias'] . "', '" . $this->contactInfos['contact_alias'] . "', '" .
$userDisplay . "', 'ldap', '" . $userDn . "', " . $this->arId . $userDisplay . "', 'ldap', '" . $this->pearDB->escape($userDn) . "', " . $this->arId .
", " . $userEmail . ", " . $userPager . ", '1', '1', '1', '2')"; ", " . $userEmail . ", " . $userPager . ", '1', '1', '1', '2')";
try { try {
$this->pearDB->query($query); $this->pearDB->query($query);
...@@ -321,7 +321,7 @@ class CentreonAuthLDAP ...@@ -321,7 +321,7 @@ class CentreonAuthLDAP
* Get the contact_id * Get the contact_id
*/ */
$query = "SELECT contact_id FROM contact $query = "SELECT contact_id FROM contact
WHERE contact_ldap_dn = '" . $this->pearDB->escape($userDn, false) . "'"; WHERE contact_ldap_dn = '" . $this->pearDB->escape($userDn) . "'";
$res = $this->pearDB->query($query); $res = $this->pearDB->query($query);
$row = $res->fetchRow(); $row = $res->fetchRow();
$contact_id = $row['contact_id']; $contact_id = $row['contact_id'];
......
...@@ -471,7 +471,6 @@ class CentreonLDAP ...@@ -471,7 +471,6 @@ class CentreonLDAP
if (trim($this->groupSearchInfo['member']) == '') { if (trim($this->groupSearchInfo['member']) == '') {
return array(); return array();
} }
$groupdn = str_replace('\\', '\\\\', $groupdn);
$group = $this->getEntry($groupdn, $this->groupSearchInfo['member']); $group = $this->getEntry($groupdn, $this->groupSearchInfo['member']);
$list = array(); $list = array();
if (!isset($group[$this->groupSearchInfo['member']])) { if (!isset($group[$this->groupSearchInfo['member']])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment