loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SETTINGS_SAVED'));
} else {
// Load template for changing settings
- $result = SQL_QUERY_ESC("SELECT `html` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
-
- // Get the mode
- $content = SQL_FETCHARRAY($result);
-
- // Free result
- SQL_FREERESULT($result);
+ if (!fetchUserData(getUserId())) {
+ // Something really bad happened
+ debug_report_bug('No user account ' . getUserId() . ' found.');
+ } // END - if
// Prepare it
$content['html_y'] = '';
$content['html_n'] = '';
- $content['html_' . strtolower($content['html'])] = ' checked="checked"';
+ $content['html_' . strtolower(getUserData('html'))] = ' checked="checked"';
// Load main template
loadTemplate('member_html_mail_settings', false, $content);