Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
danxuliu opened this issue Sep 21, 2017 · 4 comments
Assignees
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: contacts menu needs info

Comments

@danxuliu
Copy link
Member

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.

@felf
Copy link

felf commented Feb 17, 2019

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.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Feb 17, 2019
@felf
Copy link

felf commented Feb 17, 2019

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.

@felf
Copy link

felf commented Feb 17, 2019

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.

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 20, 2020
@szaimen
Copy link
Contributor

szaimen commented Jan 9, 2023

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

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 9, 2023
@szaimen szaimen closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: contacts menu needs info
Projects
None yet
Development

No branches or pull requests

5 participants