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? – Paul Bönisch Oct 16 '15 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. – Fernando Pap Oct 16 '15 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 – Paul Bönisch Oct 16 '15 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 – Fernando Pap Oct 16 '15 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 – Paul Bönisch Oct 16 '15 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.