Re-verify email on update – UserPro Forums https://forum.userproplugin.com/forums/topic/re-verify-email-on-update/feed/ Sat, 04 May 2024 16:22:16 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/re-verify-email-on-update/#post-35165 <![CDATA[Re-verify email on update]]> https://forum.userproplugin.com/forums/topic/re-verify-email-on-update/#post-35165 Mon, 28 Apr 2014 16:29:33 +0000 Shubham Dhamande Hi
When some user edits the profile and updates his/her email, i want them to verify the new email account too. Is that possible? Any setting change or code edits?

]]>
https://forum.userproplugin.com/forums/topic/re-verify-email-on-update/#post-35264 <![CDATA[Reply To: Re-verify email on update]]> https://forum.userproplugin.com/forums/topic/re-verify-email-on-update/#post-35264 Tue, 29 Apr 2014 08:35:25 +0000 admin That’s not supported by default in the plugin and would require custom coding.

e.g. It is easier via hooks. How? You can check if user updated his email and make him pending – not active if so. similar to this logic

/* action hooks before profile is updated */
add_action(‘userpro_pre_profile_update’, ‘userpro_unverify_verified_account’, 9999, 2);
function userpro_unverify_verified_account($form, $user_id){
global $userpro;

// validate display name change
if (!userpro_is_admin($user_id) && userpro_get_option(‘unverify_on_namechange’) && $userpro->get_verified_status($user_id) == 1 && !current_user_can(‘manage_options’) ) {
if (isset($form[‘display_name’])){
$old_displayname = userpro_profile_data(‘display_name’, $user_id);
$new_displayname = $form[‘display_name’];
if ($new_displayname != $old_displayname){
$userpro->unverify($user_id);
}
}
}

}

This for example, unverify a verified user if he changed his name.

]]>
https://forum.userproplugin.com/forums/topic/re-verify-email-on-update/#post-35289 <![CDATA[Reply To: Re-verify email on update]]> https://forum.userproplugin.com/forums/topic/re-verify-email-on-update/#post-35289 Tue, 29 Apr 2014 11:33:12 +0000 Shubham Dhamande Great! Thanks.
One more question: how to enable html in the email. I’m already sending html emails through mandrill with nl2br function, but i need to include links and some bold text.

]]>