# Auto activation of new users

**URL:** https://meta.discourse.org/t/auto-activation-of-new-users/117583
**Category:** Development
**Created:** [5월 13, 2019, 11:39오전 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583 "2019-05-13T11:39:56Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [5월 13, 2019, 11:39오전 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/1 "2019-05-13T11:39:56Z")

</div>

I want to auto activate the newly created users as I will be creating users for my website where users are already verified. How can i do this here?

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [5월 13, 2019, 12:37오후 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/2 "2019-05-13T12:37:40Z")

</div>

What do you mean by auto activation? Are you referring to email verification? If so this can be passed over in the SSO payload.

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [5월 13, 2019, 12:39오후 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/3 "2019-05-13T12:39:16Z")

</div>

Yeah, I meant email verification. I am creating users via discourse APIs. Can you please elaborate a little more so that I can implement it.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [5월 13, 2019, 12:40오후 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/4 "2019-05-13T12:40:22Z")

</div>

Are you using SSO between discourse and your website? What is your site running?

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [5월 13, 2019, 12:44오후 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/5 "2019-05-13T12:44:40Z")

</div>

No, I haven’t used SSO yet. I am also not sure I really need to use it. I am creating discourse users by discourse’s user creation API. The user gets created, but discourse sends an email to the newly registered user to verify its email. But I don’t need the user to verify the email as I have already done that from my own website. I just need the user to get registered and email be automatically verified without him explicitly doing it.

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [5월 13, 2019, 12:55오후 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/6 "2019-05-13T12:55:12Z")

</div>

I think I’ve got it. Just lemme try it once. There is one attribute

> “approved”: true

in the user creation API payload. I hope it works.

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [5월 13, 2019, 1:13오후 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/7 "2019-05-13T13:13:42Z")

</div>

Nope!! It didn’t worked. Can anyone tell me if this can be done? If Yes, How?

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [5월 14, 2019, 12:52오후 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/8 "2019-05-14T12:52:23Z")

</div>

This must be possible from the code. I haven’t done coding on ruby but I understand how backend works. There must be a function which is updating the database when user is activated. Instead of sending email when user signs up, I will update the field of user\_activated and disable sending email to user. I just want to know which code is responsible for that.

---

<div class="post-metadata">

### Author: ![Vishal\_Kaushik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vishal_kaushik/32/140452_2.png) [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)
#### Post date: [5월 20, 2019, 7:12오전 UTC](https://meta.discourse.org/t/auto-activation-of-new-users/117583/9 "2019-05-20T07:12:35Z")

</div>

Any one for help here? I just wanted to know how this can be achieved. Am I clear to people or still there are doubts?
