Commit ad7765d582d29b37d30ff06ee71e8d3481b6f3f7

Authored by Etienne Pallier
2 parents d8bc3d31 3fcb34d9
Exists in dev-LATMOS

Merge dev-IRAP branch into dev-LATMOS branch

doc/Labinvent Documentation.docx
No preview for this file type
doc/Labinvent Documentation.pdf
No preview for this file type
src/Model/Table/LdapConnectionsTable.php
@@ -226,7 +226,8 @@ class LdapConnectionsTable extends AppTable @@ -226,7 +226,8 @@ class LdapConnectionsTable extends AppTable
226 Quand on n'utilise pas $just_these, la fonction ldap_search() retourne TOUS les attributs disponibles, 226 Quand on n'utilise pas $just_these, la fonction ldap_search() retourne TOUS les attributs disponibles,
227 donc c'est le comportement qu'on veut ici. 227 donc c'est le comportement qu'on veut ici.
228 */ 228 */
229 - $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) ); 229 + $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these)
  230 + or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) );
230 $info = ldap_get_entries($ldapConnection, $results); 231 $info = ldap_get_entries($ldapConnection, $results);
231 //echo $info["count"]." entries returned\n"; 232 //echo $info["count"]." entries returned\n";
232 return $info; 233 return $info;
@@ -389,14 +390,13 @@ class LdapConnectionsTable extends AppTable @@ -389,14 +390,13 @@ class LdapConnectionsTable extends AppTable
389 //$binddn .= ','.$this->baseDn; 390 //$binddn .= ','.$this->baseDn;
390 391
391 // Connection 392 // Connection
392 - $ldapConnection = ldap_connect($this->host, $this->port) or die("Could not connect to $this->host (port $this->port)"); 393 + $ldapConnection = ldap_connect($this->host, $this->port)
  394 + or die("Could not connect to $this->host (port $this->port)");
393 if ($ldapConnection) { 395 if ($ldapConnection) {
394 -  
395 ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3); 396 ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3);
396 -  
397 // Binding optionnel 397 // Binding optionnel
398 - if ($this->ldap_authentified) $ldapbind = ldap_bind($ldapConnection, $this->bindDn, $this->bindPass) or die("Could not bind to LDAP server.". ldap_error($ldapConnection) );  
399 - 398 + if ($this->ldap_authentified) $ldapbind = ldap_bind($ldapConnection, $this->bindDn, $this->bindPass)
  399 + or die("Could not bind to LDAP server.". ldap_error($ldapConnection) );
400 $search = $this->getUserAttributes($user_login, $ldapConnection, $filter, $just_these); 400 $search = $this->getUserAttributes($user_login, $ldapConnection, $filter, $just_these);
401 if ($search === false) die("Could not get user attributes from LDAP server, response was: " . ldap_error($ldapConnection) ); 401 if ($search === false) die("Could not get user attributes from LDAP server, response was: " . ldap_error($ldapConnection) );
402 return $search[0]; 402 return $search[0];