Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: Also search in email field for disabled users
To match what is done for Database backend for enabled users

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed May 23, 2024
commit 8044edf30977149a1ad1ae3cdd4d3e1485fb4060
3 changes: 2 additions & 1 deletion apps/user_ldap/lib/User_Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ public function getDisabledUserList(?int $limit = null, int $offset = 0, string
fn (OfflineUser $user): bool =>
mb_stripos($user->getOCName(), $search) !== false ||
mb_stripos($user->getUID(), $search) !== false ||
mb_stripos($user->getDisplayName(), $search) !== false,
mb_stripos($user->getDisplayName(), $search) !== false ||
mb_stripos($user->getEmail(), $search) !== false,
);
}
return array_map(
Expand Down
3 changes: 2 additions & 1 deletion lib/private/User/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ public function getDisabledUsers(?int $limit = null, int $offset = 0, string $se
$users,
fn (IUser $user): bool =>
mb_stripos($user->getUID(), $search) !== false ||
mb_stripos($user->getDisplayName(), $search) !== false,
mb_stripos($user->getDisplayName(), $search) !== false ||
mb_stripos($user->getEMailAddress() ?? '', $search) !== false,
);
}

Expand Down