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 email if your Password field is enabled inside the LoginPress settings. By using this hook you can prevent the password sent to email.

Hook wp_new_user_notification_email

Usage: function loginpress_wp_new_user_notification_email_cb( $wp_new_user_notification ) {
    $wp_new_user_notification['to'] = '';
    return $wp_new_user_notification;
add_filter( 'wp_new_user_notification_email', 'loginpress_wp_new_user_notification_email_cb' );