-
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?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.
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.
You must be logged in to reply to this topic.