Commit 3fcb34d99fd0d254bfba16c67b8444b2b589e2f1
1 parent
83944285
Exists in
master
and in
3 other branches
updated doc
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
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 | 226 | Quand on n'utilise pas $just_these, la fonction ldap_search() retourne TOUS les attributs disponibles, |
227 | 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 | 231 | $info = ldap_get_entries($ldapConnection, $results); |
231 | 232 | //echo $info["count"]." entries returned\n"; |
232 | 233 | return $info; |
... | ... | @@ -389,14 +390,13 @@ class LdapConnectionsTable extends AppTable |
389 | 390 | //$binddn .= ','.$this->baseDn; |
390 | 391 | |
391 | 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 | 395 | if ($ldapConnection) { |
394 | - | |
395 | 396 | ldap_set_option($ldapConnection, LDAP_OPT_PROTOCOL_VERSION, 3); |
396 | - | |
397 | 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 | 400 | $search = $this->getUserAttributes($user_login, $ldapConnection, $filter, $just_these); |
401 | 401 | if ($search === false) die("Could not get user attributes from LDAP server, response was: " . ldap_error($ldapConnection) ); |
402 | 402 | return $search[0]; | ... | ... |