Documentation

Print This page

LoginPress Prevent New User Sent Password In Email (Hook)

WordPress sends the username and password in an email upon successful registration. You can prevent WordPress to send the password in an email if the Password field is enabled inside the LoginPress settings. By using this hook you can prevent the password sent to email for specific user roles too.

Hook loginpress_prevent_new_user_notification_email

Usage: add_action( 'init', 'loginpress_register_new_user' );
function loginpress_register_new_user() {
add_filter( 'loginpress_prevent_new_user_notification_email', 'loginpress_prevent_password_email_callback' );
}
function loginpress_prevent_password_email_callback( ) {
return array( 'prevent_user' );
}