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

[stable19] Search also the email and displayname in user mangement for groups #22118

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #21138

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@blizzz blizzz merged commit 97a5b19 into stable19 Aug 10, 2020
@blizzz blizzz deleted the backport/21138/stable19 branch August 10, 2020 09:56
@rullzer rullzer mentioned this pull request Aug 13, 2020
1 task
@MorrisJobke
Copy link
Member

MorrisJobke commented Aug 14, 2020

Unfortunately this doesn't seem to go through in stable19. The fix makes sense, but the results are not shown.

A bisect says:

gbs fixed
31519453de62dc698b18ca52b0b239c39e379f4b is the first fixed commit
commit 31519453de62dc698b18ca52b0b239c39e379f4b
Author: Christoph Wurst <christoph@winzerhof-wurst.at>
Date:   Wed Jun 3 15:11:53 2020 +0200

    Bump doctrine/dbal from 2.9.2 to 2.10.2
    
    Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>

 3rdparty | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This is #21208

Nothing we can backport I think. Maybe I can find the cause for it to work.

@MorrisJobke
Copy link
Member

This is #21208

Okay - I found it. The doctrine/dbal update from 2.9.2 to 2.10.2 fixed this. Let me check if I can restructure the query.

@MorrisJobke
Copy link
Member

I thought that maybe the produced SQL is different, but this does not seem to be the case:

stable19 and master have this:

SELECT `g`.`uid` FROM `*PREFIX*group_user` `g` LEFT JOIN `*PREFIX*users` `u` ON `g`.`uid` = `u`.`uid` LEFT JOIN `*PREFIX*preferences` `p` ON (`p`.`userid` = `u`.`uid`) AND (`p`.`appid` = 'settings') AND (`p`.`configkey` = 'email') WHERE (`gid` = :dcValue1) AND ((LOWER(`g`.`uid`) LIKE LOWER(:dcValue2) ESCAPE '\') OR (LOWER(`u`.`displayname`) LIKE LOWER(:dcValue3) ESCAPE '\') OR (LOWER(`p`.`configvalue`) LIKE LOWER(:dcValue4) ESCAPE '\')) ORDER BY `u`.`uid_lower` ASC LIMIT 25

@MorrisJobke
Copy link
Member

It was indeed the fix by @ChristophWurst that makes this work properly: https://github.com/doctrine/dbal/pull/3772/files

MorrisJobke added a commit to nextcloud/3rdparty that referenced this pull request Aug 14, 2020
Needed for nextcloud/server#22118 - working on master because there doctrine/dbal:2.10.2 is used

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke
Copy link
Member

Fix is in nextcloud/3rdparty#486

MorrisJobke added a commit that referenced this pull request Aug 14, 2020
Needed for #22118 - already in master because there doctrine/dbal:2.10.2 is used

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
MorrisJobke added a commit that referenced this pull request Aug 17, 2020
Needed for #22118 - already in master because there doctrine/dbal:2.10.2 is used

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants