diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-02 11:28:28 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-02 11:28:28 +0100 |
commit | a8641fdc9559d67696fb612597c4b27d1832220a (patch) | |
tree | 14ea8ad148c715c323f04fe3b3da65d5799e0383 /apps/user_ldap | |
parent | c5caebbd1f9d964b64bc3da79113b02770322e8a (diff) | |
parent | a2f2ffb8dbcb7f9cb0fe139f592be0d4772bec20 (diff) | |
download | nextcloud-server-a8641fdc9559d67696fb612597c4b27d1832220a.tar.gz nextcloud-server-a8641fdc9559d67696fb612597c4b27d1832220a.zip |
Merge pull request #20192 from owncloud/fix-20090
if a user that is flag as deleted shows up again, remove that flag. F…
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/access.php | 5 | ||||
-rw-r--r-- | apps/user_ldap/lib/user/offlineuser.php | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index dd8ffe14bca..bb423ecb016 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -35,6 +35,7 @@ namespace OCA\user_ldap\lib; +use OCA\user_ldap\lib\user\OfflineUser; use OCA\User_LDAP\Mapping\AbstractMapping; /** @@ -696,6 +697,10 @@ class Access extends LDAPUtility implements user\IUserTools { $ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$displayNameAttribute]); $this->cacheUserExists($ocName); $user = $this->userManager->get($ocName); + if($user instanceof OfflineUser) { + $user->unmark(); + $user = $this->userManager->get($ocName); + } $user->processAttributes($userRecord); } } diff --git a/apps/user_ldap/lib/user/offlineuser.php b/apps/user_ldap/lib/user/offlineuser.php index 72c02427928..3456a27b412 100644 --- a/apps/user_ldap/lib/user/offlineuser.php +++ b/apps/user_ldap/lib/user/offlineuser.php @@ -86,6 +86,13 @@ class OfflineUser { } /** + * remove the Delete-flag from the user. + */ + public function unmark() { + $this->config->setUserValue($this->ocName, 'user_ldap', 'isDeleted', '0'); + } + + /** * exports the user details in an assoc array * @return array */ |