} } else { $user_prefs['AVATAR_AID'] = null; } } if ($valid) { // Update User Preferences if (user_update_prefs($profile_uid, $user_prefs, $user_prefs_global)) { // Update basic settings in USER table if (user_update($profile_uid, $user_info_new['LOGON'], $user_info_new['NICKNAME'], $user_info_new['EMAIL'])) { // If email confirmation is requied and the user has changed // their email address we need to get them to confirm the // change by sending them another email. if ($profile_uid == $_SESSION['UID'] && $admin_edit === false) { if (forum_get_setting('require_email_confirmation', 'Y') && $user_info_new['EMAIL'] != $user_info['EMAIL']) { if (email_send_changed_email_confirmation($profile_uid)) { perm_user_apply_email_confirmation($profile_uid); html_draw_top(array('title' => gettext('My Controls - User Details - Email address has been changed'), 'class' => 'window_title')); html_display_msg(gettext("Email address has been changed"), gettext("Your email address has been changed and a new confirmation email has been sent. Please check and read the email for further instructions."), 'index.php', 'get', array('continue' => gettext("Continue")), array(), '_top'); html_draw_bottom(); exit; } else { html_draw_top(array('title' => gettext("Error"))); html_display_msg(gettext("Email address has been changed"), gettext("You have changed your email address, but we were unable to send a confirmation request. Please contact the forum owner for assistance."), 'index.php', 'get', array('continue' => gettext("Continue")), array(), '_top'); html_draw_bottom(); exit; } } } // Force redirect to prevent refreshing the page prompting to user to resubmit form data. if ($admin_edit === true) {
} } } } } if ($valid) { // Update User Preferences if (user_update_prefs($uid, $user_prefs, $user_prefs_global)) { // Update basic settings in USER table if (user_update($uid, $user_info_new['LOGON'], $user_info_new['NICKNAME'], $user_info_new['EMAIL'])) { // If email confirmation is requied and the user has changed // their email address we need to get them to confirm the // change by sending them another email. if ($uid == session::get_value('UID') && $admin_edit === false) { if (forum_get_setting('require_email_confirmation', 'Y') && $user_info_new['EMAIL'] != $user_info['EMAIL']) { if (email_send_changed_email_confirmation($uid)) { perm_user_apply_email_confirmation($uid); html_draw_top(sprintf('title=%s', gettext("My Controls - User Details - Email address has been changed")), 'class=window_title'); html_display_msg(gettext("Email address has been changed"), gettext("Your email address has been changed and a new confirmation email has been sent. Please check and read the email for further instructions."), 'index.php', 'get', array('continue' => gettext("Continue")), false, '_top'); html_draw_bottom(); exit; } else { html_draw_top(sprintf("title=%s", gettext("Error"))); html_display_msg(gettext("Email address has been changed"), gettext("You have changed your email address, but we were unable to send a confirmation request. Please contact the forum owner for assistance."), 'index.php', 'get', array('continue' => gettext("Continue")), false, '_top'); html_draw_bottom(); exit; } } } // Force redirect to prevent refreshing the page prompting to user to resubmit form data. if ($admin_edit === true) {