When users have to re-authenticate via gitlab, their mattermost username gets over-written with the one from gitlab. This is unwanted.
Steps to reproduce
Using 3.9.0 and all previous versions of mattermost, delegating authentication to a separate gitlab installation.
Create a user, then change the user's username. Then expire the session or otherwise force the user to re-authenticate.
None of the user's account details are replaced; the only field required to match their gitlab account is the email address.
The username is replaced with the gitlab username. Possibly First and Last names are replaced too, I am not sure.