Skip to content

Commit

Permalink
unmark deleted users if their last login date is more recent than del…
Browse files Browse the repository at this point in the history
…eted date

Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and backportbot[bot] committed May 30, 2024
1 parent 540a5c7 commit 7b9d0be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/user_ldap/lib/User/DeletedUsersIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ private function fetchDeletedUsers(): array {

$userObjects = [];
foreach ($deletedUsers as $user) {
$userObjects[] = new OfflineUser($user, $this->config, $this->mapping, $this->shareManager);
$userObject = new OfflineUser($user, $this->config, $this->mapping, $this->shareManager);;
if ($userObject->getLastLogin() > $userObject->getDetectedOn()) {
$userObject->unmark();
} else {
$userObjects[] = $userObject;
}
}
$this->deletedUsers = $userObjects;

Expand Down

0 comments on commit 7b9d0be

Please sign in to comment.