-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Allow searching for users by displayname in the database group backend #17800
Conversation
tests :) |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
d966388
to
5822e13
Compare
Hmm needs more adjustments since this change will no longer find users in other backends then |
I also stumbled over this. In the database we search over userID, displayname and email: server/lib/private/User/Database.php Lines 266 to 278 in 145eee9
I'm coming here, because searching in groups (in the user management) only searches user IDs, while searching the "all" tab it checks for user ID, display name and email:
One can also see that the I just checked the userbackend which has a server/lib/public/UserInterface.php Line 74 in caff102
There multiple backends implement it in different ways:
... what a mess, because our public interface only says "search" and doesn't specify anything. What now? |
negative, the first filters for valid users, the second ensures the displayname attribute is present, the third pulls in the search attributes, which are configurable. |
It depends in the user case. For end user search, this fuzzyness is ok and good, as long as the desired results are shown. There are use cases where API-wise you like to search for something specific, e.g. when user_saml gets an id and wants to ensure the corresponding LDAP user is imported. At the moment this is also treated with search. |
I tried porting the function from the |
Let's close this here in favor of #21138 |
When searching for users in a group by displayname only the uid was matched before:
server/lib/private/Group/Group.php
Line 309 in 653628c
With this PR usersInGroup will also check for matching displaynames when called with a $search parameter