Can't update username to old one
Summary
A user had some problems renaming his account. He changed the username and was not able to change it back to the old one but he was able to create a new account with the old username:
- I went to my account settings and tried to rename my username from Couto to couto. I was presented with a 500 error. I then tried to rename my account from Couto to lcouto, which it did successfully.
- I then tried to rename my username from lcouto to couto (again), and got the 500 error again.
- So I ended up registering a new account (couto), which is fine… but if I do something like gitlab.com/couto/swiss-army-knife I am redirected to gitlab.com/lcouto/swiss-army-knife
Discussed on slack with @stanhu and @briann and it is possible to be a duplicate of https://sentry.gitlap.com/gitlab/gitlabcom/issues/39289/