aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-03-01 17:22:21 +0100
committerJosh <josh.t.richards@gmail.com>2024-05-27 10:14:26 -0400
commit36cb845f0578d4a8db496cfd782c4567ad3924bf (patch)
treef43f396428b1e7faec54585958855219375fed13 /apps/user_ldap
parentd87c23242b96903d59b978a936179f5441c26773 (diff)
downloadnextcloud-server-36cb845f0578d4a8db496cfd782c4567ad3924bf.tar.gz
nextcloud-server-36cb845f0578d4a8db496cfd782c4567ad3924bf.zip
unmark deleted users if their last login date is more recent than deleted date
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/User/DeletedUsersIndex.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/User/DeletedUsersIndex.php b/apps/user_ldap/lib/User/DeletedUsersIndex.php
index d679ca86d93..6ed14213d97 100644
--- a/apps/user_ldap/lib/User/DeletedUsersIndex.php
+++ b/apps/user_ldap/lib/User/DeletedUsersIndex.php
@@ -56,7 +56,12 @@ class DeletedUsersIndex {
$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;