Documentation

Print This page

How To Prevent New User To Send The Password In Email With LoginPress (Hook)

WordPress sends the username and password in email upon successful registration. You can prevent WordPress to send the email if your Custom Password Fields is enabled inside the LoginPress settings.

You can use the following hook in your Child Theme’s file function.php and update the file to prevent the new user to send the password in email with LoginPress.

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' );

That’s how you can easily prevent the new user to send the password in email with LoginPress plugin by using the hook mentioned above.