Try our conversational search powered by Generative AI!

Change Username

Vote:
 

Hi,

Is it possible to change a user's Username? At present the field in the CMS is Readonly.

If it is possible how would you update it?

Jon

#88364
Jul 09, 2014 16:25
Vote:
 

No, as it's the id of the user it's not meant to change.

You could of course create a new account with a temporary email (can't have duplicates), delete the old one and then update the email on the new account.

But you'd most likely would like the new user to have the same access rights, which might be simple enough if you've only set access using groups. But, what about those access rights set explicitly for user A (deleted)? And what about Creator?

Motivation picture

If any other road is blocked by stacks of meat eating lawyers that haven't been fed for a week - then maybe. Otherwise it'd advice against it. I've done it my self.

#88369
Jul 10, 2014 9:29
Vote:
 

Jonathan, it is doable..

Use google or have a look at these links: http://forums.asp.net/p/1161521/1924933.aspx#1924933 and http://forums.asp.net/t/1167483.aspx?Membership+Change+username

So to achieve this you need to directly edit the data in the asp.net aspnet_Users table (is it wise? if you need this functionality then it is your only option).

As a side note referring to pappabj0rn answer to explicit rights for user, one should never give rights explicitly to a user but use groups.

#88429
Jul 12, 2014 9:41
Vote:
 

Withing the EpiServer provided dlls we cant but Antti is right. I have Done Once where user can change his email address and email address was his user name also.

You will need a custom Stored Procedure on aspnet_Users

Check Is there any User Exist with New UserName
If Not
Update the User name.

Regards

/K

#88444
Jul 14, 2014 10:57
Vote:
 

It looks like there is a loose connection between the users table and other customer related tables based on the username.  We will need to update them as well. I think we will need to sutdy EPI Server database structure in order to make this change. 

Thanks,

Syed

#117372
Feb 19, 2015 12:40
Vote:
 

c/p from http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=117283

I guess you only want to change the username, and keep the old email.

Usernames are stored in the Users table. UserName is not PK / FK / unique constraint, so you can safely change it there.

User access rights are stored in tblContentAccess table. You need to change the Name column (free text).

Just make sure that 'new username' is not already in use.

#117375
Feb 19, 2015 13:00
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.