• Resolved Erfan MHDi

    (@erfanmhd)


    Hello,
    Ultimate Member can confirm user email addresses upon registration.
    but users can change their email address from account page (General Tab), after first registration.

    how can i send confirmation email upon email address changes from account page, like registration form?!

    P.S: this topic is reopen of this one here, the method ldeschenes said is not working for me. i’m looking for a way to trigger the send event of original Activation Link Email of UM (so i can use the email template that i have an override for it in my theme folder )

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @erfanmhd

    This should solve your issue with resending the e-mail activation link when e-mail is changed from the UM Account page.

    
    add_action( 'um_account_pre_update_profile', 'my_account_email_update_profile', 10, 2 );
    
    function my_account_email_update_profile( $changes, $user_id ) {
    
        global $my_email_update_profile;
        
        um_fetch_user( $user_id );
        $my_email_update_profile = 	um_user( 'user_email' );
    }
    
    add_action( 'um_after_user_account_updated', 'my_after_user_account_updated', 10, 2 );
    
    function my_after_user_account_updated( $user_id, $changes ) {
    
        global $my_email_update_profile;
    
        if( isset( $changes['user_email']) && $my_email_update_profile != $changes['user_email'] ) {
            um_fetch_user( $user_id );
            UM()->user()->email_pending();
        }
    }

    Install to your child-theme functions.php file
    or use the “Code Snippets” plugin

    https://wordpress.org/plugins/code-snippets/

    • This reply was modified 2 years, 9 months ago by missveronica.
    • This reply was modified 2 years, 9 months ago by missveronica.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Email Confirmation on Change from Account Page’ is closed to new replies.