How to change username of existing user

Hello

gitlab CE 9.4.

I have an existing user (originally created by auth from Active Directory) that has a different gitlab username due to an existing user already having the AD username (now deleted from gitlab).

i.e. AD username is jsmith. Local user on gitlab existed as jsmith. So AD user jsmith was jsmith1 on gitlab when account created. Now original jsmith local gitlab user deleted. I need to rename jsmith1 in gitlab to jsmith to match the AD username they have.

Obviously need to preserve groups, projects, etc. Also not quite clear on username versus profile name. Both are jsmith1 and both I presume need to change.

Many thanks.

r.