Have an update on this one - if you make this change in SQL by editing the mdl_user table to change username make sure you edit the mdl_auth_oidc_token table username column to match or delete the existing entries in it. Without this you'll get login errors for users with existing tokens.
Authentication
Changing usernames using MySQL query - is it safe?
This discussion has been locked so you can no longer reply to it.