Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to let the users edit their usernames? Today, I googled for such a code for a while and had no luck finding a solution except a few plugins. I didn't find any tutorial for doing so.

These are the plugins I found- Username changer and BuddyPress user name changer. The first plugin's interface is no good and I want to offer the users a native interface to edit user names. Brajesh's BuddyPress user name changer is similar to what I expected. But that works only if BuddyPress is setup. Could any suggest me a nice way to let the users edit their user names?

Plugins would help me. But I can also manage to code if someone guide me through.

Update:

I am looking for a solution to edit the default usernames because sometimes, there would be a problem with the default user name appearing for the public. When you use Social Networks via OAuth(Twitter and Google etc.) for your member login , the user accounts will created with prefixes like Yourfullname-Google or sometimes Yourfullemailaddress-Google.

The author URLs appear like this- site.com/author/twitter-random-name or site.com/author/google-profile-address-uglyurl. Here the user's profile URL appears ugly or lengthy and doesn't look in a normal way like-site.com/the-author-name

Also I use a plugin named Quick Subscribe which helps us to get users subscribe and register account just using their email addresses creating random passwords. Here the problem is that the the user names will be created based on the email address(ex: userfullemailaddressgmail.com). The plugin is not popular as it has to be, but that helps people like me to let the users subscribe with single email address.

The author URLs appear like this- http://site.com/author/author-full-email-addressgmailcom. The user's email address is blown out to the spammers. I can't resist using this subscribe plugin because of it's usability.

In such cases I want to let users edit their user names to save themselves being their email addresses revealed to the public.

share|improve this question
1  
maybe This which is actually from here ( at the top bar you have a search field .. –  krembo99 Dec 25 '13 at 3:33
    
I have already checked that question and the solution given there. I don't see a possibility to achieve what I need. My question is to edit the user name in any way(backend or backend) which is restricted by default(native WordPress restriction). –  IamSJ Dec 25 '13 at 15:41
    
What is your reason for wanting to do this? Is it a problem with the name displayed or something else? –  mantis Dec 25 '13 at 21:44
    
The problem is with the default user name appearing for the public. When you use OAuth or Social Networks for your member login , the user accounts will created with prefixes like Yourfullname-Google or sometimes Yourfullemailaddress-Google. In such cases I want to let users edit their user names to save themselves being their email addresses revealed to the public. –  IamSJ Dec 26 '13 at 12:23
    
@krembo99 Thanks for the reference. I have checked the answer and didn't find a way to build what I need. Can you tell me how the answer you linked helps me to let the end-users edit their username? I can proceed if you suggest me way to build a solution to let users edit their usernames. –  IamSJ Dec 26 '13 at 12:54

2 Answers 2

Is there a way to let the users edit their usernames?

no.

I think you summarized nicely why this should not be easily possible, since a change of user name will change the URLs of pages in the site something that only an admin should be able to do.

Of course you can write a plugin that will do that if you truly want it but the better solution is to either change the code of the plugins that you are using to produce a saner names, or let the users select a name when registering (if you think the default is not good why do you force them to make a second step to change it when that step could have done with the registration).

In any case, as long as you do not point to the users author pages the url issue is purely theoretical.

share|improve this answer
    
The author page is probably in use or it likely wouldn't be have been noticed. –  mantis Dec 27 '13 at 20:50

There may not be any reason to have users edit their usernames and it is not a good idea in any case.

Your problem is likely not the username but the display name. WordPress automatically uses the User login to fill in the User Display Name so unless the user changes this the user login will be showing.

Your plugin might and should be showing the display name but since it is likely blank given your registration system, it is showing the User login- in your case the e-mail. If this is not the case and your plugin does display the user login then you might need to go through it and change the instances of user_login to display_name.

You can come up with a way to create a User Display name from the email or otherwise here is a plugin for you: sx user-name-security

To change the author url here is an article with a step by step explanation.

share|improve this answer
1  
hmmm,it is specified rather clearly in the question that he wants the ability to change the user name and not the display name. As for that plugin, it doesn't add any security as the url of the author page contains the user name. –  Mark Kaplun Dec 27 '13 at 19:39
    
I was inferring that the goal was not to expose the user's email address. He/she answered the question as to whether it was possible in the first sentence as there are indeed plugins available to do so. I did miss the bit about the url though. –  mantis Dec 27 '13 at 20:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.