How to Assign Usernames?


(Steve) #1

Is there a way to assign usernames to new users during the invite process? I’m asking everyone to use first_last in our community to make it easier to mention people in posts. Ideally, when I invite someone and it accepts them into the community, their username is assigned.

I’ve been changing each manually and I don’t know if that is making it harder for people to log in. Thanks!


(Jeff Atwood) #2

Is that possible via the CSV invite method @techapj?


(Arpit Jalan) #3

This can be done by generating Invite Links via Discourse API:


Bulk Invite via CSV does not support this option yet.


(Allen - Watchman Monitoring) #4

This version does support a username


(Steve) #5

This looks very promising. I have installed discourse on digital ocean. It lib/tasks something that I can SFTP into or is something that I need to do via the command line?

Add this file to your lib/tasks and run one of the following tasks:

It sounds like this might be for advanced users, but it would be enormously helpful. I’m trying to roll out discourse to 150 in our group at the usernames is proving to be a bit of an issue. Any pushes or links in the direction of running this user importer would be appreciated.


(Allen - Watchman Monitoring) #6

this wasn’t “simple” but it wasn’t hard either… it’s less effort than trying to do it manually.

yes, if you’re installed on any VPS, you should be able to ssh into the box, enter the docker container & do this.


(Steve) #7

@watchmanmonitor you probably know how to do this without looking at any notes, but I’m at a loss on how to add a file to lib/tasks via SSH

I’m going to start going through some of this links, but if you know of a way that I can educate myself, I’d appreciate it!

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=lib%2Ftasks+ssh

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=add+file+to+lib%2Ftasks+


(Steve) #8

I haven’t been able to figure this out. Can someone help me move my .csv file into lib/tasks? Thanks!


(Allen - Watchman Monitoring) #9

ssh in to your host
enter the container
type vi /tmp/users.csv
then hit i to enter insert mode, and paste in your csv file.
now save your file, and it should be available for processing via @vindia cool script

that’s still kinda over-simplified, but it’s using copy/paste to move your file across, saving the hassle of sftp