Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/user_ldap/lib/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

namespace OCA\user_ldap\lib;

use OCA\user_ldap\lib\user\OfflineUser;
use OCA\User_LDAP\Mapping\AbstractMapping;

/**
Expand Down Expand Up @@ -695,6 +696,10 @@ public function batchApplyUserAttributes(array $ldapRecords){
$ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$this->connection->ldapUserDisplayName]);
$this->cacheUserExists($ocName);
$user = $this->userManager->get($ocName);
if($user instanceof OfflineUser) {
$user->unmark();
$user = $this->userManager->get($ocName);
}
$user->processAttributes($userRecord);
}
}
Expand Down
7 changes: 7 additions & 0 deletions apps/user_ldap/lib/user/offlineuser.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ public function __construct($ocName, \OCP\IConfig $config, \OCP\IDBConnection $d
$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
Expand Down