So you are going to send email to activate the user? If yes then it’s better to send invites instead of creating accounts via API. Because invitations will activate the user instantly when they accept it and the password reset email will be sent.
The API about invitation is not well presented in the documentation… I guess I’ll have to read the code to find out how it works.
Is there a way to accept the invitation for the user and just send him the “reset password” mail ? The goal here is to easily add a willing user without asking him to set his password directly. In our case, we have a contact form on our website (with name, email and message) bearing a checkbox “register me on the forum”.
So I’d like the server handling the form to add the user to discourse though API.
We could do that, but the form handler isn’t yet behind a SSL layer so I’d rather have Discourse handling the password.
So I thought that if there was a way to do that more or less easily directly in Discourse it would be better. If not, I’ll fall back to your proposal