The GitHub username is case-insensitive while the actual name that is returned during the oauth dance might be mixed case.
So a user can change his username from batman to BatMan and it will be the same user on GitHub, all api calls work regardless if you use batman or BatMan as username. However, the exact name as chosen by the user is returned in the oauth data receive from GH provider and we use that name as is to associate it with existing users in the user_data table.
However, if a user first creates a username batman, logs in to open-vsx.org, then changes his name to BatMan and logs in again, a second user will be created.
What we need to do is normalize the login_name and use the normalized version to lookup in the database.
The GitHub username is case-insensitive while the actual name that is returned during the oauth dance might be mixed case.
So a user can change his username from
batmantoBatManand it will be the same user on GitHub, all api calls work regardless if you usebatmanorBatManas username. However, the exact name as chosen by the user is returned in the oauth data receive from GH provider and we use that name as is to associate it with existing users in the user_data table.However, if a user first creates a username
batman, logs in to open-vsx.org, then changes his name toBatManand logs in again, a second user will be created.What we need to do is normalize the
login_nameand use the normalized version to lookup in the database.