if a user that is flag as deleted shows up again, remove that flag. Fixes #20090

This commit is contained in:
Arthur Schiwon 2015-10-30 19:20:42 +01:00
parent 6911d8f0a4
commit a2f2ffb8db
2 changed files with 12 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -85,6 +85,13 @@ class OfflineUser {
$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
* @return array