Commit fa557299ba083315b6ad2035c2510a801f53d504

Authored by Etienne Pallier
1 parent d2c77887

login renamed user_login

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
src/Model/Table/LdapConnectionsTable.php
... ... @@ -321,7 +321,7 @@ class LdapConnectionsTable extends AppTable
321 321 ];
322 322 }
323 323  
324   - public function ldapAuthentication($login, $user_password)
  324 + public function ldapAuthentication($user_login, $user_password)
325 325 {
326 326 try {
327 327 if ($this->checkConfiguration()) {
... ... @@ -338,7 +338,7 @@ class LdapConnectionsTable extends AppTable
338 338 if ($LDAP_ANONYMOUS) {
339 339 //$dn = "ou=users,dc=irap,dc=omp,dc=eu";
340 340 //$dn = $this->baseDn;
341   - $binddn = $this->authenticationType . '=' . $login;
  341 + $binddn = $this->authenticationType . '=' . $user_login;
342 342 $ldappass = $user_password;
343 343 $filter = '('.$binddn.')';
344 344 $just_these = array("cn");
... ... @@ -365,7 +365,7 @@ class LdapConnectionsTable extends AppTable
365 365 $ldapbind = ldap_bind($ldapConnection, $binddn, $ldappass) or die( "Could not bind to LDAP server.". ldap_error($ldapConnection) );
366 366 if ($ldapbind) {
367 367 //return $this->getUserAttributes($login, $LDAP_ANONYMOUS, $filter, $just_these)[0];
368   - $search = $this->getUserAttributes($login, $LDAP_ANONYMOUS, $filter, $just_these) or die("Could not search in LDAP server, response was: " . ldap_error($ldapConnection) );
  368 + $search = $this->getUserAttributes($user_login, $LDAP_ANONYMOUS, $filter, $just_these) or die("Could not search in LDAP server, response was: " . ldap_error($ldapConnection) );
369 369 return $search[0];
370 370 /*
371 371 * } else {
... ... @@ -376,7 +376,7 @@ class LdapConnectionsTable extends AppTable
376 376  
377 377 // We are not using LDAP (use FAKE LDAP instead)
378 378 } else {
379   - $user = $this->getFakeLdapUser($login);
  379 + $user = $this->getFakeLdapUser($user_login);
380 380 // debug($user);
381 381 if ($user === false)
382 382 return FALSE;
... ...