'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.

3 Likes

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.

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.

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.

1 Like

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.

2 Likes

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.

1 Like

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.

1 Like

@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?

EDIT:
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 
/var/lib/docker/overlay2/f62c3c9258dac2925fbc591af67f3bcd3518fb96e668a3ffc94e7fd4fca35f39/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/563d960aacb7f28cec7c4b9886236f8f247591d5f73d5f92e265f9d77f2a5445/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/ecc385f4fb621a8a3c3008a351c217b5a91ec420b80db237c8c14ba2e241d038/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/eeb535fc00ee34dcc9f7e4fb4047e7d8a23141ac4c8f6468cdbdbf3d14d3a1ad/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/bb114e9baa39415ec62c47e933c8eab85c1e278d79f072949584abfd0040f45a/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/673e87a4d858d683f27c06edaf729bca82e6e042e0318bb15190fb330f4d8031/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/e1b2c1576c7154af9291434dfb8dad195d997cd3aadd5c67ef545096311c7107/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/ea0d7890bdcd81546dcae4353d2f0af63a01f50e2f385db5e624a48602b39879/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/e9ef214eafac6b3a32379100fb36a3698a590390e32cf16c4155ea82cc8d8841/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/d23bb55087cbe07d9f9dc4632fa2525c3c9d1ebb4f51f1b1c4f843bf8dec37b5/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/259256e9a8215361c8d471f64a949958e628edba94d2e6591d7ef8abc75c927a/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/d1411fa7a8680d0cc5d40aa3075c5ac7d5950e82e7dea0a534110190b860e849/merged/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/1234accbd49100b334889bc47b23ac0c64dab34c4985101c3e0e269e823babd7/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/7962d862842f2a8c2925c863a1533d5920db238e160c234de0251d3f9665a5d2/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/dab289af1e1cb737816ca9159f527c32c967b37005b610c9a6a0203ea1c608d8/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/bc09dc89afd8921a5f0d5e5986d912827c73358b570a3c8c3da72fa2b58198b0/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/282f26acb8ef45bdee1d3decfa7e17e4c88aa9072c19aa976e4c33f5d9caad03/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/d5f9c17847317ee6b4a1702946fe4efd9b369385afcdc0deafff2a256c733c8f/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/becf6ebe2a176238f8ab7ae735e6b07e32103d3e9144121c13597e5a3021248c/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/55dc00aca76400b4c6d7642e2c991994da5b98e8abc39d8e4763ce03ee897219/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/f35b9cc8f45c891dfe7f895e60706d6037780498a85c663f4f9ab93126c310ae/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/8af8eca6f96f76652ca557dff3fb98e5644b842d02a650b26aebe2415c839687/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/78b2656a2b932c19c926feb1ae737fe8460e15854bfac6d036e0ec3a2316b38a/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/87b4eff503dba027e92d09544d9dea603fd4bafcf15f7bb08b41ed4a4f4f58e5/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/d12aa1b6fba07aaeb889379338a87644cabd74f31a48d6650834065d9993b7cf/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/742ef3325b4e8768587c1fd4ba6b0c578ed2373a0a29a758bf96cd8165b9f855/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/7d28921013c9077d83b8b92a9181617a4dab4648f5fc4df700afd20642b41332/diff/var/www/discourse/lib/guardian/user_guardian.rb
/var/lib/docker/overlay2/c376b69b3f312c28d6521271c6cb74b120060547aabfbbb1b451df30f82caea5/diff/var/www/discourse/lib/guardian/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.

2 Likes