When uppercase/lowercase spelling changed for the email address (e.g. synchronized via LDAP), UserManager updateUser method fails (and therefore, in case of LDAP, auth fails).
This is because the comparison of old/new email address is case sensitive, but the duplicate check for that email address in the database is case insensitive. That leads to an exception.
@peterbo do you know where exactly in the
UserManager updateUser method the check needs to be case insensitive? Not sure how the API is called there. I suppose you mean https://github.com/matomo-org/matomo/blob/3.12.0-b4/plugins/UsersManager/API.php#L926-L928 ?
@tsteur right, that's the spot where the check should be case insensitive (e.g. strcasecmp or strtolower on both values?)
Created PR 👍
@tsteur oops, sorry, I was late to the party! Just ignore my commit. Thanks for tackling the issue, Thomas!