diff -r 1e4b759da336 -r acb7e23b6ffa plugins/SpecialUserPrefs.php --- a/plugins/SpecialUserPrefs.php Sat Apr 26 17:25:28 2008 -0400 +++ b/plugins/SpecialUserPrefs.php Sun May 04 21:57:48 2008 -0400 @@ -542,7 +542,25 @@ $session->user_extra['user_hobbies'] = $hobbies; $session->user_extra['email_public'] = intval($email_public); - $q = $db->sql_query('UPDATE '.table_prefix."users SET real_name='$real_name', user_timezone = $tz_local WHERE user_id=$session->user_id;"); + // user title + $user_title_col = ''; + if ( $session->get_permissions('custom_user_title') && isset($_POST['user_title']) ) + { + $user_title = trim($_POST['user_title']); + if ( empty($user_title) ) + { + $colval = 'NULL'; + $session->user_title = null; + } + else + { + $colval = "'" . $db->escape($user_title) . "'"; + $session->user_title = $user_title; + } + $user_title_col = ", user_title = $colval"; + } + + $q = $db->sql_query('UPDATE '.table_prefix."users SET real_name='$real_name', user_timezone = $tz_local{$user_title_col} WHERE user_id=$session->user_id;"); if ( !$q ) $db->_die(); @@ -580,6 +598,8 @@ $db->free_result(); } + generate_ranks_cache(); + echo '