# How to Assign Usernames?

**URL:** https://meta.discourse.org/t/how-to-assign-usernames/46163
**Category:** Support
**Created:** [June 22, 2016, 5:43am UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163 "2016-06-22T05:43:52Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![sjmscott](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sjmscott/32/198290_2.png) [@sjmscott](https://meta.discourse.org/u/sjmscott)
#### Post date: [June 22, 2016, 5:43am UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/1 "2016-06-22T05:43:52Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 22, 2016, 5:48am UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/2 "2016-06-22T05:48:19Z")

</div>

Is that possible via the CSV invite method @techapj?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [June 22, 2016, 6:02am UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/3 "2016-06-22T06:02:04Z")

</div>

> [@sjmscott](#):
>
> Is there a way to assign usernames to new users during the invite process?

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

> [@Generating lots of Invite Tokens](https://meta.discourse.org/t/generating-lots-of-invite-links/17563):
>
> warning This plugin is deprecated in favour of our core invite system. Summary: Generate multiple invite tokens link GitHub: [https://github.com/discourse/discourse-invite-tokens](https://github.com/discourse/discourse-invite-tokens)arrow_right Install: Follow the [plugin installation guide](https://meta.discourse.org/t/install-a-plugin/19157). Configuration Enable plugin After installing plugin enable site setting invite tokens enabled. Clone Discourse API Gem If you already have Git and Ruby installed on your system, you can install Discourse API by running following command from consol…

* * *

> [@codinghorror](#):
>
> Is that possible via the CSV invite method @techapj?

Bulk Invite via CSV does not support this option yet.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [June 24, 2016, 3:48pm UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/4 "2016-06-24T15:48:11Z")

</div>

This version does support a username

[https://github.com/vindia/discourse\_user\_importer](https://github.com/vindia/discourse_user_importer)

---

<div class="post-metadata">

### Author: ![sjmscott](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sjmscott/32/198290_2.png) [@sjmscott](https://meta.discourse.org/u/sjmscott)
#### Post date: [June 24, 2016, 4:43pm UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/5 "2016-06-24T16:43:49Z")

</div>

> [@watchmanmonitor](#):
>
> [GitHub - vindia/discourse\_user\_importer: A tiny script to import users from a CSV file into Discourse · GitHub](https://github.com/vindia/discourse_user_importer)

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.

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [June 24, 2016, 5:08pm UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/6 "2016-06-24T17:08:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![sjmscott](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sjmscott/32/198290_2.png) [@sjmscott](https://meta.discourse.org/u/sjmscott)
#### Post date: [June 24, 2016, 5:14pm UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/7 "2016-06-24T17:14:06Z")

</div>

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

> **[Google](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=lib%2Ftasks+ssh)**
>
> Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.

> **[Google](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=add+file+to+lib%2Ftasks+)**
>
> Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.

---

<div class="post-metadata">

### Author: ![sjmscott](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sjmscott/32/198290_2.png) [@sjmscott](https://meta.discourse.org/u/sjmscott)
#### Post date: [July 22, 2016, 8:31pm UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/8 "2016-07-22T20:31:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [July 22, 2016, 9:00pm UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/9 "2016-07-22T21:00:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/how-to-assign-usernames/46163/10 "2024-06-08T12:45:23Z")

</div>

This topic was automatically closed after 2908 days. New replies are no longer allowed.
