Manually changing username in Asp.Net Membership

前端 未结 3 1355
我在风中等你
我在风中等你 2021-01-01 02:37

I am able to change a username by directly accessing the asp.net membership user tables. However, the old username is preserved in a new row and assigned a new UserID autom

3条回答
  •  暖寄归人
    2021-01-01 03:15

    How did you change the username? I just did it by using an update sql statement and updated the username without creating new rows or preserving the old username.

    UPDATE [MyDatabase].[dbo].[aspnet_Users] 
    SET [UserName] = 'mynewusername',
        [LoweredUserName] = LOWER('mynewusername')
    WHERE [UserName] = 'myusername'
    

提交回复
热议问题