How to enable users to change their username

(Matthias Busch) #1

I am a user of a discourse forum.

At this forum it’s not possible to change the username.

The admin needs a bit time to get used to the software.
So i want to help him. Can you point me to a good tutorial how one can enable the “change username” feature.

Thanks for your help and support!

(Jeff Atwood) #2

Change the username_change_period site setting from its default of 3 days. The description for this setting says:

The number of days after registration that accounts can change their username (0 to disallow username change).

(Matthias Busch) #3

Thx for the fast answer !

So the username_change_period tells me how long the user profile has to exist?

But why can I change my username her on mega.discourse immediately after creation?

(Jeff Atwood) #4

Other way around, it is a limit after creation. There is a grace period for new accounts to change their username.

(Matthias Busch) #5

I see. Then my problem is that I have to change my user name although my grace period is over.

Is there a command which the admin of the forum can use to set the username of an user?

(Jeff Atwood) #6

Yes, simply edit the name in the user preferences for that user.

(Matthias Busch) #7

But I as a user can’t do that?
I am speaking about the username which other can refer to with @

There this other name stated as “long version” of the username which I can edit easily.

I feel really stupid to ask such easy questions. Thank you for your patience

(Kane York) #8


To clarify:

(Matthias Busch) #9

Ok thanks.
I finally got it. Thx guys for the fast help.

I regard this as “closed” now because that’s what I wanted to know.

(Stuart Alexander) #10

Why does this limit exist? Is it possible to be able to change username whenever the user wants?

(Adnan) #11

Changing usernames regularly would be really odd from an users perspective. That’s like changing your gmail address whenever you want.

Currently I don’t think there is an option to change usernames whenever users want. You could set the option under settings > users > ‘username change period’ to some insane number like 200000000, that should take care of it. I think.

(Stuart Alexander) #12

I guess that makes sense. But it does mean you can get stuck with a username you don’t like. For example, I don’t really want to be “stu1”

(Adnan) #13

This should solve your problem. There maybe a better way to solve this issue.

(Luke S) #14

As a side point, you would be amazed by the number of people I run into that do this, or at least, lose access/forget password, etc. and simply create a new gmail - such people often have 3-5 old ones.

(Stuart Alexander) #15

Other social networks let you change your name / username when you want. Generally people let others know if they’re going to do this, and keep the same avatar.
It seems weird to enforce this.

(Jeff Atwood) #16

Then you can set the site setting value to whatever you want, right now it defaults to a 3 day window after signup. Set it to 999999 if you like.

Note that all @username references to that user in post text will be broken after the name change.

(Stuart Alexander) #17

OK I guess I see the reason if we’re storing the @mention as text, thus breaking all the links. Couldn’t this be avoided by instead storing the resolved userID like [user:12345] and then looking it up on render to get the current @username ?

Sure I can set that value on my site, but I can’t set it here as not an admin…

(Jeff Atwood) #18

In that case just PM one of the admins, admins can change names any time.

We found on Stack Overflow that allowing people to change their name potentially as much as every time they post was a profoundly bad idea in retrospect…

(Stuart Alexander) #19

was that because it broke the posts too? Or just that it led to confusion? You’ve obviously thought this issue through, I’m just curious.

(Joshua Frank) #20

Is there any good way to find these broken references and fix them?