diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-07-30 17:42:33 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-07-30 17:42:33 +0200 |
commit | b465fc84ae9fd1f678ce8cf1bd0c5a91d3665a05 (patch) | |
tree | 24bbe60e8ff5d927e81aebc5072bc419cbc455ce /apps/user_ldap/user_ldap.php | |
parent | fa62ff62d2e48bee72aaf5b7d306abe77d90308b (diff) | |
download | nextcloud-server-b465fc84ae9fd1f678ce8cf1bd0c5a91d3665a05.tar.gz nextcloud-server-b465fc84ae9fd1f678ce8cf1bd0c5a91d3665a05.zip |
LDAP: don't die on unexpected collisions, handle empty display-name attributes properly
Diffstat (limited to 'apps/user_ldap/user_ldap.php')
-rw-r--r-- | apps/user_ldap/user_ldap.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 57b2ef489ba..2059d5b0c6d 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -79,12 +79,19 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface { return false; } - //update some settings, if necessary - $this->updateQuota($dn); - $this->updateEmail($dn); + //do we have a username for him/her? + $ocname = $this->dn2username($dn); - //give back the display name - return $this->dn2username($dn); + if($ocname){ + //update some settings, if necessary + $this->updateQuota($dn); + $this->updateEmail($dn); + + //give back the display name + return $ocname; + } + + return false; } /** |