Skip to content

Contacts with a different display name than the user name are not found when autocompletion is disabled #6609

@danxuliu

Description

@danxuliu

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

  1. 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
  2. Create a user user1 with full/display name user1
  3. Create a user user2 with full/display name name1
  4. In the contacts menu, type user1
  5. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions