User registration with confirmation by an admin

Hello,

I would like to have a system that, when a user try to register, it is then confirmed by an admin, so I try to do it with authentication challenge.

I send email to admin with 2 links, 1 for confirm with the code if auth challenge, and 1 for reject. The problem is that for reject, i can’t delete the user by id because the email is send to the admin, so i have the admin infos in the email template.

Is there a way to send the email to the admin but still have the user infos ?

Ty :smiley:

have you though about not using the “authentication challenge” system?

Think 3 user roles, like:

  • admin
  • user
  • disabled

Create new users with a “disabled” role, send an email to the admin notifying her/him of the new user and give the admin the possibility to switch the users role. Obviously only give the admin the permission to change roles.

Oh didn’t think to it, but yes it may be a way better option ty :grin: