Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: codebirth - helmikuu 22, 2009, 08:21:38 AP

Otsikko: Modify username
Kirjoitti: codebirth - helmikuu 22, 2009, 08:21:38 AP
Hello,

Is possible to allow users to modify their username? I don't mean the display name but the username they login with.

Thanks!
Otsikko: Re: Modify username
Kirjoitti: phpMyTony - helmikuu 22, 2009, 08:22:46 AP
Yes, go to their profile, then Account settings, then go to where their username is and press change.
Otsikko: Re: Modify username
Kirjoitti: codebirth - helmikuu 22, 2009, 08:26:10 AP
I know I can modify their username. What I want to know if there is a way to allow users to modify their own username.

Thanks!
Otsikko: Re: Modify username
Kirjoitti: phpMyTony - helmikuu 22, 2009, 08:30:07 AP
Ohhhhhhh. No, I dont think so.
Otsikko: Re: Modify username
Kirjoitti: ~Killer~ - helmikuu 22, 2009, 09:00:30 AP
What version of SMF are you using? I do know there is a default item in SMFShop that allows you to do that, maybe you can look into the code it uses and take it from there.
Otsikko: Re: Modify username
Kirjoitti: codebirth - helmikuu 22, 2009, 09:06:32 AP
I'm using 2.0 RC1. Will take a look into SMFShop.

Thanks!
Otsikko: Re: Modify username
Kirjoitti: H - helmikuu 22, 2009, 09:22:48 AP
There is no built in method to do this. This is because the username is tied to the password and keeping it different from the display name is also an intended security feature
Otsikko: Re: Modify username
Kirjoitti: codebirth - helmikuu 22, 2009, 09:28:53 AP
Oh I see. My problem is that I'm importing users from another system (not a forum) where they login with their email address and password and I will auto-generate a numeric username for them, but it would be nice if they would be able to change the username they login with. But if not, it won't be a big problem anyway.

Thanks!
Otsikko: Re: Modify username
Kirjoitti: H - helmikuu 22, 2009, 02:17:56 IP
That certainly makes sense :)

As an admin, you could manually change it for them, although you'd also need to change their password (or have them manually reset it, with the forgot password tool).

Alternatively you could request a mod, allowing users to change their own usernames (Mod Requests (http://www.simplemachines.org/community/index.php?board=79.0))
Otsikko: Re: Modify username
Kirjoitti: codebirth - helmikuu 22, 2009, 03:36:22 IP
Thanks. Another option I was considering is to add some custom code that would ask them for a username on their first login, since their password will not be tied with the username yet (the password I'm importing is simply encrypted with MD5) so there's no need to allow them to change their username later. I still need to look at it deeper.
Otsikko: Re: Modify username
Kirjoitti: greyknight17 - maaliskuu 13, 2009, 08:32:07 IP
codebirth, is this issue resolved now? If not, we can move this over to the Mod Request board for you or you can manually update their names using your administrator account.
Otsikko: Re: Modify username
Kirjoitti: codebirth - maaliskuu 14, 2009, 04:36:40 AP
Yes greyknight17 , I solved it but not the way I though in the beginning. I was importing +11,000 users so manually updating their username was not an option. I made a MOD (http://custom.simplemachines.org/mods/index.php?mod=1665) so they have to login with their email address / password like in the old system and now the username has no utility on that board, which is not a problem anyway. They can manually change their "default" display name if they want.

Thanks for your interest.