# How to manually add users and email in console mode?

**URL:** <https://meta.discourse.org/t/how-to-manually-add-users-and-email-in-console-mode/26669>\
**Category:** Support\
**Created:** [March 23, 2015, 2:16pm UTC](https://meta.discourse.org/t/how-to-manually-add-users-and-email-in-console-mode/26669 "2015-03-23T14:16:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)\
**Post date:** [March 23, 2015, 3:25pm UTC](https://meta.discourse.org/t/how-to-manually-add-users-and-email-in-console-mode/26669/2 "2015-03-23T15:25:53Z")

</div>

```ruby
rails c
u = User.create!(username: "name", email: "name@email.com", password: "password")
u.approve(Discourse.system_user, false) # if manual approvals are required
u.activate

```

If the user should be an admin, add `, admin: true` to the create line inside the parentheses; likewise for moderators.

---

_[View the full topic](https://meta.discourse.org/t/how-to-manually-add-users-and-email-in-console-mode/26669)._
