-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
When a user has a display name that is different than her user name that user does not appear in the Contacts menu even when her full user name is typed if "Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered." is disabled in the "Sharing" section of the administration settings.
The problem seems to be that the initial search for users is made only for FN and EMAIL, but not UID. Therefore, although the filter takes into account the UID, if the user name was not the same as the full name (or the e-mail address) it would not even appear in the list of entries to be filtered.
Note that filterContacts is used also by findOne, but I have not checked that code path yet and I do not know if there could be similar issues there too.
Steps to reproduce
- Log in as the admin and disable "Allow username autocompletion in share dialog. If this is disabled the full username or email address needs to be entered." in the "Sharing" section of the administration settings
- Create a user user1 with full/display name user1
- Create a user user2 with full/display name name1
- In the contacts menu, type user1
- In the contacts menu, type user2
Expected behaviour
In both cases, when the user name is typed in the contacts menu the user is found.
Actual behaviour
In the first case (same full/display name as the user name) the user is found; in the second case it is not.