]> source.dussan.org Git - nextcloud-server.git/commit
I dug into it again, and the issue is much simpler than I previously though. 33922/head
authorLouis Chemineau <louis@chmn.me>
Tue, 6 Sep 2022 08:58:01 +0000 (10:58 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Tue, 6 Sep 2022 15:24:01 +0000 (15:24 +0000)
commit0b5619f1325e3ce47f94324bf545320fa2027058
tree4469666c6f37a1f0a72668526288cdaa9f88ed84
parentb09750c379898b8493a66ce527ea502735f5c576
I dug into it again, and the issue is much simpler than I previously 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 <louis@chmn.me>
lib/private/User/User.php