Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Changing a user name
Avatar
Paul Smith
Member
sp_UserOfflineSmall Offline
Mar 24, 2014 - 9:32 am

A user wants to change his user name but keep the posts he's made on the forum. I understand that it's not possible to change a user name. Is that correct? As a workaround could I create a new user, transfer his posts from his old account to his new account and delete his old account. If it is possible, how do I do it?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 24, 2014 - 9:48 am

Technically WordPress does not allow you to change a users login name. Your proposed solution would actually be quite a nightmare as the users ID - which is used in a large number of data tables - is actually what is used internally to identify the user and you really do not want to change that.

Having said all that if you use a tool like phpMyAdmin and change the users login name in the 'users' table it will work although it is important to use a unique replacement not used by anyone else and not to change anything else in the data row.

But I didn't tell you that!

Anyway - the only person who should know or ever really use the login name is the user themselves with the sites admins being able to find out what it is...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Paul Smith
Member
sp_UserOfflineSmall Offline
Mar 24, 2014 - 11:34 am

Great stuff. Mum's the word!

Avatar
Paul Smith
Member
sp_UserOfflineSmall Offline
Mar 24, 2014 - 11:41 am

One final thought, in WP admin it's possible to delete a user and assign the user's posts to a different user. Does this just apply to the WP posts or would it also apply to the forum posts?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 24, 2014 - 12:50 pm

It does not apply yet - partly because the hooks we really need are not in the WordPress core to pick up on user deletes in a useful way. We have raised an issue with the WP team and offered the code and we hope it will get incorporated sopn so we can improve the whole area of user deletion.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Paul Smith
Member
sp_UserOfflineSmall Offline
Mar 24, 2014 - 1:44 pm

OK. Thank you.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 24, 2014 - 8:12 pm

you are welcome...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625