I'm trying to avoid users getting emails when their account is created, so I've unchecked the Require e-mail verification when a visitor creates an account setting in Registration and cancellation.

The problem I have now is this. Users are created with a custom form in my module. If an admin creates them, everything is fine. However if another type of user does it they automatically get logged in as the newly created user.

How can I disable this autologin?

Alternatively I'd also be happy with any other way to disable email notifications when a new user is created. Apparently using

$conf['user_mail_*_notify'] = FALSE;

in settings.php will not do the trick. I replaced the * with values from here

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.