I have created multi-step form through custom module. I am using user_save() function to register the user and user_mail_notify() to send the email.

Now I am not sure what should I send in _user_mail_notify() so email verification link will work.

I have account settings in the backend as shown in screenshot

enter image description here

and sending op value as 'register_no_approval_required' in _user_mail_notify() function. I am receiving verification email in inbox but when I click it then it doesn't work.

However it works when we register through default registration form. Please let me know if anything I am missing to add.

2 Answers 2


When you create a new account using "user_save()", What status you passed "0" or "1", If you required email verification then it should be 'status' => 0, in user_save().

  • Yes, I am passing status as '0' so user will remain as blocked till the time user hasn't verified email. But after clicking on it, it just say access denied however it should log me in with email verified message. Dec 11, 2015 at 7:30
  • 1
    You can refer this answer posted by "Omar" Dec 11, 2015 at 7:34
  • OK thanks, I have allowed users to set their password at the form. So checking this reference link I can see that I need to send a custom link and a custom verification page where it will be validated. But don't you think this email will not work like default that shows you have already used this link. Also any good reference link to create that custom email verification page. Dec 11, 2015 at 7:48
  • 1
    For custom email verification you can do something like "This" Dec 11, 2015 at 7:56
  • 1
    This is some what related to you "Custom user registration" Dec 11, 2015 at 8:00

Solved, My problem are email service on server.

Now I use smpt (https://www.drupal.org/project/smtp)

It's ok.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.