Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -375,10 +375,18 @@ |
376 | 376 | |
377 | 377 | $entry = @ldap_read( $ldapconn, $userdn, "objectclass=*" ); |
378 | 378 | $info = @ldap_get_entries( $ldapconn, $entry ); |
379 | | - $this->email = $info[0]["mail"][0]; |
380 | | - $this->lang = $info[0]["preferredlanguage"][0]; |
381 | | - $this->nickname = $info[0]["displayname"][0]; |
382 | | - $this->realname = $info[0]["cn"][0]; |
| 379 | + if (isset($info[0]["mail"])) { |
| 380 | + $this->email = $info[0]["mail"][0]; |
| 381 | + } |
| 382 | + if (isset($info[0]["preferredlanguage"])) { |
| 383 | + $this->lang = $info[0]["preferredlanguage"][0]; |
| 384 | + } |
| 385 | + if (isset($info[0]["displayname"])) { |
| 386 | + $this->nickname = $info[0]["displayname"][0]; |
| 387 | + } |
| 388 | + if (isset($info[0]["cn"])) { |
| 389 | + $this->realname = $info[0]["cn"][0]; |
| 390 | + } |
383 | 391 | |
384 | 392 | $this->printDebug( "Retrieved: $this->email, $this->lang, $this->nickname, $this->realname", self::SENSITIVE ); |
385 | 393 | } |