Skip to content

Conversation

@backportbot-nextcloud
Copy link

backport of #33813

…though.

- LDAP has an email address with capital letters
- NC store this address in lower case
- When the user logs in, we compare the [stored email with the new lower case email](https://github.com/nextcloud/server/blob/master/lib/private/AllConfig.php#L259-L261) before storing it. Here, both email will be the same, so we won't store the new email address with upper case letters. Which is what we want.
- We then [compare emails as they are before triggering an event](https://github.com/nextcloud/server/blob/master/lib/private/User/User.php#L202-L204), they won't match, so the user will receive an email signaling an email change every time he logs in.

The fix is to compare the old email with the new lower case email before sending the event.

Signed-off-by: Louis Chemineau <[email protected]>
@come-nc
Copy link
Contributor

come-nc commented Jan 2, 2023

@blizzz You reverted in #33936 , is it ok to merge again now?

Same question for #35946

@blizzz blizzz merged commit 02e3657 into stable23 Jan 17, 2023
@blizzz blizzz deleted the backport/33813/stable23 branch January 17, 2023 09:14
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug feature: emails feature: ldap php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants