Skip to content

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

Closed

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.

Activity

  1. self-assigned this
    on Sep 26, 2017
  2. felf commented on Feb 17, 2019

    @felf

    Not sure if this is 100 % the same cause, but I also encountered this problem. However, I do not have autocompletion disabled.

    My case in a nutshell: I created three users and put them into a group. I also put my own user into that group and made it group admin. Then I noticed that one of the new users did not show up in the Users dropdown. I.o.w. I click on the dropdown, it opens and is filled initially with a list of users visible to me.

    After some deduction I noticed that the missing user is the only one with a dedicated Display Name set (simply the capitalised user name, which itself is all lowercase). So I created a new test user without a display name and it shows up in the list alright. Then I log in as that user, set its display name -- to the same string as the user name -- and log back into by own account. And voilà; the test user is gone from the list.

    I had this issue originally in NC 13, but yesterday I upgraded to NC 15 and the problem persists. Hence this comment.

  3. felf commented on Feb 17, 2019

    @felf

    Oh, one more thing. I tried using the web gui to set the display name back to an empty string or to the user name, but it had no effect. The users that do show up in the drowdown have NULL in their displayname column of the oc_users table. So I reset the display name of the missing user to NULL, but that didn’t bring them back, either.

  4. felf commented on Feb 17, 2019

    @felf

    Sorry to get on your nerves... while contemplating on what I can do to fix my setup, I simply tried to reproduce the problem, but could not anymore.

    First I noticed that my other NC instance was not affected (which has been running NC 15 for a while already), and now my main instance, which had the above problem, is "healed" as well. The difference is that the affected user was created with NC 13, whereas since yesterday I’m running NC 15. Perhaps this info is helpful in some way, also to the OP.

  5. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jun 12, 2019
  6. added
    1. to developAccepted and waiting to be taken care of
    and removed
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Aug 20, 2020
  7. szaimen commented on Jan 9, 2023

    @szaimen
    Contributor

    Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

  8. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    and removed
    1. to developAccepted and waiting to be taken care of
    on Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions