New User Approval via email

Jon White asked on February 1, 2017 15:45

Hi there,

I want to set up user registrations to a secure area on our site. We want to 'vet' the registrations so need to enable admin approval.

I know you can do this and get an email sent to admin to log in to the cms and approve.

However, I was hoping to make the process easier and available to people without having to log in to the system and approve.

Is there a way for an email to be sent to admin where they just click a link in the email to approve/reject a new user?

Thanks in advance, Jon

Recent Answers


Trevor Fayas answered on February 1, 2017 15:54

Off the top of my head i am unsure, there is a way for the user to get the email to click and approve, you can probably programatically set up to generate the same email link using the Global Event Hooks (when a user is created, send an email to the admin with a link to the email confirmation page and get the user link).

0 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on February 1, 2017 18:08 (last edited on February 1, 2017 18:38)

Yes there are two ways we do it. 1) Create a custom email provider and then create the link and code and send it to whomever you wish. If you wanted to get snazzy with it, you could set up a setting in the Settings module that you could add an email(s) into and that the Custom Email Provider Class could read from, so it isn't all hard coded. They will click the email and it will approve the account when the page loads. 2) Create a custom email provider and then expose a rest api, so when they click the link it is sent to the api which confirms the account. We use this for mobile and sms text.

The first one is the easier of the two. It shouldn't take you more than 30 minutes or so to do this if you can write C#. See the example in documents, "Custom Email Provider".

Additionally you indicate "Approve" or "Reject". If you are requiring Approval than each new user is, in fact, in a rejected sort of state. If by "Reject" you want to delete or somehow flag the user in another way, then you will have to write some custom code to do something and/or us API-REST.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.