Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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.
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.
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
user_pass_reset_url($account);
you get that url that links to pass reset pagehook_form()
for your registration form andhook_form_submit()
where your new user will be created and mail send