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?
AI-generated summary
The discussion revolves around auto-activating new users in Discourse without requiring email verification. Vishal_Kaushik wants to bypass the email verification step when creating users via the Discourse API, as they are already verified on their own website. They initially tried using the approved: true attribute in the API payload but found it ineffective. Stephen asked for clarification, leading Vishal_Kaushik to explain that they are not using SSO and need a way to automatically verify emails during user creation. They suspect a backend code change is needed to skip the email send and directly set the user as activated. Vishal_Kaushik seeks guidance on which code handles user activation and email sending to implement this functionality.
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?