Change Invited people username & name by default?



My forum is for entrepreneurs, companies. So mostly the invited people have the email like, So when I invite these people all get the same username and name by default like info1, info2, support3 and so on.

What I want is the forum should automatically set the username and name to their domain
e.g. if the email is - then the username & name should be domain name of the invited person - example - discourse

How can I do this?

(Robert) #2

You would need to patch Discourse. Have a look here:


Thanks for the help. How can I overwrite the file?

(Kane York) #4

Here you go:

Can you think of any others? If so, reply and I’ll change it.

(Robert) #5

I guess you went for the recommended docker install. In this case, it’s a bit

Naive approach:

  • ./launcher ssh your-app

Than you can change the file in /var/www/discourse/ .
You would need to reboot afterwards. However, on your next Discourse update
using docker, the change would be lost.

So it might be better to create a dedicated template for this:

However, if the template is applied before discourse files are in place, this
doesn’t help you.

You could also try to define a docker volume that overwrites the visibility of
that particular file. You could also run a custom command to change the file.
This might be the most easiest solution. Change your file. create a patch file
and pipe in the patch file from a shell here document right from the yml
container description.

Once you got it working, please post your solution!