• Resolved Saikishore

    (@saikishore)


    Hi,

    Is there someway where the admin can be notified with an email everytime the user is modifying his/her profile?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Genetech Solutions

    (@genetech)

    Hi,

    There is no predefined notification email in Pie Register settings when a user updates the profile.

    However, you can write custom code to send an email in a function and hook that function to ‘piereg_update_profile_event’ action. This action executes every time a user updates their profile.

    Thank you

    Thread Starter Saikishore

    (@saikishore)

    Any sample or reference for the same?

    Plugin Author Genetech Solutions

    (@genetech)

    Hi,

    The following is the sample code on how to use the action.
    This is to be pasted in your current theme’s functions.php file.

    add_action( 'piereg_update_profile_event', 'send_email_on_profile_update', 10, 3 );			
    
    function send_email_on_profile_update($user_id, $form_id,$user_data)
    {
    	if(!current_user_can('administrator')){
    		// Code to send an email
    	}
    }

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.