Chaning an accounts username

80 views
Skip to first unread message

will...@gmail.com

unread,
Jun 1, 2021, 8:31:37 AM6/1/21
to Repo and Gerrit Discussion

Hello,

We have user accounts synced via ldap. For one of our users their account name has changed but not their email. When they try to login with their new username they get an error, searching the log this is because there is already an account with that email address.

Have used the accounts REST API to fetch details of the old account.

To fix the issue I would ideally change the accountname in the existing account, but trying to change this via the rest api is not allowed and returns “405 Method Not Allowed”. Is there any way I can change the username of the existing account? Perhaps by deleting the external.ids?

I assume the only other option would be to clear the email address on the old account and then the user would be able to login with their new account name but it would have created a new account. Would like to avoid going this route if possible.

Thanks
Will

will...@gmail.com

unread,
Jun 3, 2021, 5:13:00 AM6/3/21
to Repo and Gerrit Discussion
To answer my own question, had to checkout refs/meta/external-ids, change the username in the files and also rename them and then push back to gerrit, following docs at https://gerrit-review.googlesource.com/Documentation/config-accounts.html#external-ids
Reply all
Reply to author
Forward
0 new messages