From fa557299ba083315b6ad2035c2510a801f53d504 Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Fri, 14 Dec 2018 12:22:43 +0100 Subject: [PATCH] login renamed user_login --- src/Model/Table/LdapConnectionsTable.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Model/Table/LdapConnectionsTable.php b/src/Model/Table/LdapConnectionsTable.php index 35f2f2d..8a1b25c 100755 --- a/src/Model/Table/LdapConnectionsTable.php +++ b/src/Model/Table/LdapConnectionsTable.php @@ -321,7 +321,7 @@ class LdapConnectionsTable extends AppTable ]; } - public function ldapAuthentication($login, $user_password) + public function ldapAuthentication($user_login, $user_password) { try { if ($this->checkConfiguration()) { @@ -338,7 +338,7 @@ class LdapConnectionsTable extends AppTable if ($LDAP_ANONYMOUS) { //$dn = "ou=users,dc=irap,dc=omp,dc=eu"; //$dn = $this->baseDn; - $binddn = $this->authenticationType . '=' . $login; + $binddn = $this->authenticationType . '=' . $user_login; $ldappass = $user_password; $filter = '('.$binddn.')'; $just_these = array("cn"); @@ -365,7 +365,7 @@ class LdapConnectionsTable extends AppTable $ldapbind = ldap_bind($ldapConnection, $binddn, $ldappass) or die( "Could not bind to LDAP server.". ldap_error($ldapConnection) ); if ($ldapbind) { //return $this->getUserAttributes($login, $LDAP_ANONYMOUS, $filter, $just_these)[0]; - $search = $this->getUserAttributes($login, $LDAP_ANONYMOUS, $filter, $just_these) or die("Could not search in LDAP server, response was: " . ldap_error($ldapConnection) ); + $search = $this->getUserAttributes($user_login, $LDAP_ANONYMOUS, $filter, $just_these) or die("Could not search in LDAP server, response was: " . ldap_error($ldapConnection) ); return $search[0]; /* * } else { @@ -376,7 +376,7 @@ class LdapConnectionsTable extends AppTable // We are not using LDAP (use FAKE LDAP instead) } else { - $user = $this->getFakeLdapUser($login); + $user = $this->getFakeLdapUser($user_login); // debug($user); if ($user === false) return FALSE; -- libgit2 0.21.2