Viewing 1 replies (of 1 total)
  • Plugin Author adispiac

    (@adispiac)

    Hi,
    First and foremost I strongly advice against doing this, email passwords in plain text to your users, for obvious security reasons.

    You can achieve what you want by hooking into the “wppb_edit_profile_success” hook, which triggers after a successful edit profile form submit.

    The code to add to your functions.php goes like this:

    /* Send password via email after changing it on edit profile*/
    add_action('wppb_edit_profile_success', 'wppb_email_user_changed_password');
    function wppb_email_user_changed_password()
    {
        if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit_profile') {
            if (isset($_REQUEST['passw1']) && !empty($_REQUEST['passw1']) && !empty($_REQUEST['form_name'])) {
    
                $message = 'Your new password is: '.$_REQUEST['passw1'];
                wp_mail( $_POST['email'], 'New Password', $message);
            }
        }
    }

Viewing 1 replies (of 1 total)
  • The topic ‘new password edit profile’ is closed to new replies.