'Alternate' username, or alias?

Not sure if this is the best category, sorry if it’s not.

Our users have a bit of an odd request from anything I’ve ever seen before. Basically, they want to have specific categories to allow them to run writing contests in. They want to create ‘alias’ or ‘alternate’ usernames that are used automatically when they post in a topic, and at a certain time, have those alternate usernames ‘unmask’ to reveal what their ‘parent’ username is after a certain trigger (manually, or by a certain time/date). I know admins have the ability to impersonate users (in a way), and the system can automatically create anonymous usernames, so it seems like there might at least be hints toward supporting this kind of functionality? Users can select to enter anonymous mode, what about selecting to post as their ‘other’ username?

Why can’t the users to register new alt accounts? I don’t know. I asked the same thing. I’m just asking you guys what they asked me. I think they see this extra step of having to register a new alternate account (because for each contest, they have to post as a different user for the duration of the contest) as annoying. They don’t want to deal with multiple logins. :man_shrugging:

Anonymous mode might be good for this. It isn’t automatic, but it gives users an anonymous alt they can easily switch between without logging out.

The other features sound very specific to your site’s use, so it’s not likely something we’d implement. You’d need a custom plugin.


Yeah I’m aware of anonymous mode, and the users have rejected this as an option. They want to be able to enter certain categories and have all posts made in that category automatically be from their “pseudonym,” or alternate username. They want to be able to create these because they like coming up with fun names and stuff.

It seems that the logic to do this is somewhere in the codebase, I just don’t know where. I’m thinking I’d need to find the part of Discourse that’s responsible for creating usernames, and expose that as an option in their profile settings, giving them the ability to define a pseudonym (similar to how they can input their name, or handle). Then, when they’re in certain categories, all posts made show up as being authored by this pseudonym.

1 Like

A workaround could be if it was possible to enter a “full name” for your “anonymous account”. I guess the “anon123” is the nickname. If it were possible to add a full name somewhere in the preferences, that you could change, that would do pretty much what you need. You would have to convince the team to do that, or see if someone can do it for you (plugin ?)

Or, something far more simple: Your users do have an idea in mind. But if you actually manage to convince them that they can still choose a name and use it to sign their post (inside the post) and/or put the name at the beginning of the post, the anonymous mode works as it is.

1 Like

If you’re not concerned that people could cheat by looking in the javascript stuff, you could conceivably do this with a theme component. You’d just have it hide the username stuff in that topic when it was game time. People could look at the json load and see who was who, though.

1 Like

Until the duration for the account ends and a new one is created. Is a setting was made so a user can keep their anonymous accounts pernamently.


Yeah this would work. Cheating wouldn’t be a concern. How would you do this?

1 Like

Something like this:

.category-support .topic-meta-data {
    display: none;

That will hide the username bit. You’d need to do some more work to hide the avatars.

1 Like

Ah I see. But that doesn’t solve the problem of allowing users to create their own alias.


No, this would make everyone be anonymous until the reveal.

To give people an alternate ego, it’d be more complicated. I guess you could use a custom user field and maybe be able to insert them? Or it might take a plugin.


I’m thinking the way to do it would be to create a field, like how Real Name is implemented, then when posting, hide all but that element? But surely you’d have to enable this as a plugin so you can control which categories this behavior is enabled in?

EDIT: well no, you could use CSS to do this (hide all but the alias)?

EDIT2: my users have rejected this idea, since clicking on the name would take you to the user profile and you’d see the rest of the elements and know, so they want anonymity more strictly enforced.


@dmitry_fedyuk do you have any thoughts on this? It looks like you were close when you wrote the Real Name plugin

1 Like

So this will work for us with the current implementation of anonymous mode provided that users can change their profile name, but it looks like when you enter anonymous mode, you can’t change your profile name. Anyone know how to fix this?

Okay, so it looks like anon users USED to be able to change this, but it was ‘fixed’ here:

Is there a local setting or file somewhere running that I can change? Searching for the file ‘user_guradian.rb’ yields a bunch of Docker stuff:

leigh@ip-10-0-1-36:/var/discourse$ sudo find / -name user_guardian.rb 

I guess I could fork core and make these changes myself and then do my own install…? Surely there’s an easier way?

Ideally an admin could check/uncheck an option to allow/disallow anon users from changing these values. @maja do you have any thoughts on this?

1 Like

How many categories do you have where users will want to use alternate personas?

1 Like

A handful?
Anonymous Mode will work for this purpose, I just need to figure out how to let users edit their profile name from “anonymous123” to something they want. I found the commit where this was changed and it’s a configuration present in user_guardian.rb but I’m not sure how to override or change that without forking core. Ideally either a plugin enables this or a config setting.