2

I need to send to specific persons one-time registration email links, in order to create users with specific roles. The "normal" registration should be available as well.

7
  • Do you want to send just an random email with this link or an user registration email? Commented Oct 16, 2015 at 13:24
  • I want to send an email such as when the receiver clicks it, it redirects to a "special" registration page, and when finished the registration form, creates a user with predefined roles. Nobody can acces that page without a one-time link. Commented Oct 16, 2015 at 13:29
  • I don't know what do you mean with special page but with user_pass_reset_url($account); you get that url that links to pass reset page Commented Oct 16, 2015 at 13:40
  • I know, but what I want is not to reset the password of an existent user, I want to register a new user, like the form presented when you visit /user/register Commented Oct 16, 2015 at 13:46
  • you should implement hook_form() for your registration form and hook_form_submit() where your new user will be created and mail send Commented Oct 16, 2015 at 13:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.