Skip to content
Snippets Groups Projects
Commit a8641fdc authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #20192 from owncloud/fix-20090

if a user that is flag as deleted shows up again, remove that flag. F…
parents c5caebbd a2f2ffb8
Branches
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
namespace OCA\user_ldap\lib; namespace OCA\user_ldap\lib;
use OCA\user_ldap\lib\user\OfflineUser;
use OCA\User_LDAP\Mapping\AbstractMapping; use OCA\User_LDAP\Mapping\AbstractMapping;
/** /**
...@@ -696,6 +697,10 @@ class Access extends LDAPUtility implements user\IUserTools { ...@@ -696,6 +697,10 @@ class Access extends LDAPUtility implements user\IUserTools {
$ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$displayNameAttribute]); $ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$displayNameAttribute]);
$this->cacheUserExists($ocName); $this->cacheUserExists($ocName);
$user = $this->userManager->get($ocName); $user = $this->userManager->get($ocName);
if($user instanceof OfflineUser) {
$user->unmark();
$user = $this->userManager->get($ocName);
}
$user->processAttributes($userRecord); $user->processAttributes($userRecord);
} }
} }
......
...@@ -85,6 +85,13 @@ class OfflineUser { ...@@ -85,6 +85,13 @@ class OfflineUser {
$this->fetchDetails(); $this->fetchDetails();
} }
/**
* 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 * exports the user details in an assoc array
* @return array * @return array
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment