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
10 changes: 9 additions & 1 deletion apps/files_sharing/lib/Controller/ShareesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,15 @@ protected function getUsers($search) {
$lowerSearch = strtolower($search);
foreach ($users as $uid => $user) {
/* @var $user IUser */
if (strtolower($uid) === $lowerSearch || strtolower($user->getDisplayName()) === $lowerSearch || strtolower($user->getEMailAddress()) === $lowerSearch) {
if (
// Check if the uid is the same
strtolower($uid) === $lowerSearch
// Check if exact display name
|| strtolower($user->getDisplayName()) === $lowerSearch
// Check if exact first email
|| strtolower($user->getEMailAddress()) === $lowerSearch
// Check for exact search term matches (when mail attributes configured as search terms + no enumeration)
|| in_array($lowerSearch, array_map('strtolower', $user->getSearchTerms()))) {
if (strtolower($uid) === $lowerSearch) {
$foundUserById = true;
}
Expand Down
Loading