diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-10-31 19:42:17 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-11-09 11:10:56 +0100 |
commit | 59c05d54472aeed458611341970a72e42e5b9e6a (patch) | |
tree | d8503e2c9a080d068c4bb6b7a3e7cf7bfa1e1a06 /apps/user_ldap/lib/User/User.php | |
parent | ef3cd329167ce236b7f7a09293be439623e585c5 (diff) | |
download | nextcloud-server-59c05d54472aeed458611341970a72e42e5b9e6a.tar.gz nextcloud-server-59c05d54472aeed458611341970a72e42e5b9e6a.zip |
move LDAP user attributes "sync" to background (except for ajax jobs)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/User/User.php')
-rw-r--r-- | apps/user_ldap/lib/User/User.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index ed3ecedf227..afd43999c7f 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -190,13 +190,6 @@ class User { } unset($attr); - //Email - $attr = strtolower($this->connection->ldapEmailAttribute); - if(isset($ldapEntry[$attr])) { - $this->updateEmail($ldapEntry[$attr][0]); - } - unset($attr); - //displayName $displayName = $displayName2 = ''; $attr = strtolower($this->connection->ldapUserDisplayName); @@ -217,6 +210,15 @@ class User { } unset($attr); + //Email + //email must be stored after displayname, because it would cause a user + //change event that will trigger fetching the display name again + $attr = strtolower($this->connection->ldapEmailAttribute); + if(isset($ldapEntry[$attr])) { + $this->updateEmail($ldapEntry[$attr][0]); + } + unset($attr); + // LDAP Username, needed for s2s sharing if(isset($ldapEntry['uid'])) { $this->storeLDAPUserName($ldapEntry['uid'][0]); |