Auto activation of new users

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?

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

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.

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

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.

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.

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

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.

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?