Database operations to change guid or usernames

Hugo Cuellar Posted in General Discussion 3 months ago

Hello Community, i have some questions regarding to database.

Time ago i was able to change username of an old user to a new username in the phpMyAdmin without errors or problems, obviously this was done when the site was without active users or interactions with that users, so i think it was safe.

So i was wondering if i can change the guid of an old user for example "520" to a guid "2" or "3".

Replying to the question "Why?" because i dont have users with the guid "2" or "3", etc, because those users were deleted from the database in the past, so i want to use that old GUIDs with new accounts or existing accounts.

Another question is can i change the administrator username? and then use the Restrict Usernames component to block admin, administrator, moderator, etc usernames??

Replies
cl Hugo Cuellar Replied 3 months ago

Thanks for the reply guys!

Indonesian Arsalan Shah Replied 3 months ago

https://stackoverflow.com/a/1632328
You can have total 18446744073709551615 max GUID value and I don't think you will ever reach this stage.

My answer is same as Michael.

Another question is can i change the administrator username? and then use the Restrict Usernames component to block admin, administrator, moderator, etc usernames??

Yes you can

German Michael Z├╝lsdorff Replied 3 months ago
  1. Never change ANY guid / id
  2. Usernames may be changed but have to stay UNIQUE. Sort your ossn_users table by username via phpMyadmin BEFORE applying a change like that to rule out duplicates.