aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/usercp_register.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/usercp_register.php')
-rw-r--r--phpBB/includes/usercp_register.php210
1 files changed, 108 insertions, 102 deletions
diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php
index b1c4a495e2..1d964ed4e0 100644
--- a/phpBB/includes/usercp_register.php
+++ b/phpBB/includes/usercp_register.php
@@ -21,7 +21,7 @@
*
***************************************************************************/
-if ( !defined('IN_PHPBB') )
+if (!defined('IN_PHPBB'))
{
die('Hacking attempt');
exit;
@@ -78,7 +78,7 @@ if ($mode == 'register' && !isset($_POST['agreed']) && !isset($_GET['agreed']) &
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
-$coppa = ( empty($_POST['coppa']) && empty($_GET['coppa']) ) ? 0 : TRUE;
+$coppa = (empty($_POST['coppa']) && empty($_GET['coppa'])) ? 0 : TRUE;
//
// Check and initialize some variables if needed
@@ -95,7 +95,7 @@ if (isset($_POST['submit']) || $mode == 'register')
foreach ($strip_var_list as $var => $param)
{
- if ( !empty($_POST[$param]) )
+ if (!empty($_POST[$param]))
{
$$var = trim(strip_tags($_POST[$param]));
}
@@ -105,7 +105,7 @@ if (isset($_POST['submit']) || $mode == 'register')
foreach ($strip_var_list as $var => $param)
{
- if ( !empty($_POST[$param]) )
+ if (!empty($_POST[$param]))
{
$$var = trim($_POST[$param]);
}
@@ -119,34 +119,34 @@ if (isset($_POST['submit']) || $mode == 'register')
// empty strings if they fail.
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
- $viewemail = ( isset($_POST['viewemail']) ) ? ( ($_POST['viewemail']) ? TRUE : 0 ) : 0;
- $allowviewonline = ( isset($_POST['hideonline']) ) ? ( ($_POST['hideonline']) ? 0 : TRUE ) : TRUE;
- $notifyreply = ( isset($_POST['notifyreply']) ) ? ( ($_POST['notifyreply']) ? TRUE : 0 ) : 0;
- $notifypm = ( isset($_POST['notifypm']) ) ? ( ($_POST['notifypm']) ? TRUE : 0 ) : TRUE;
- $popuppm = ( isset($_POST['popup_pm']) ) ? ( ($_POST['popup_pm']) ? TRUE : 0 ) : TRUE;
+ $viewemail = (isset($_POST['viewemail'])) ? (($_POST['viewemail']) ? TRUE : 0) : 0;
+ $allowviewonline = (isset($_POST['hideonline'])) ? (($_POST['hideonline']) ? 0 : TRUE) : TRUE;
+ $notifyreply = (isset($_POST['notifyreply'])) ? (($_POST['notifyreply']) ? TRUE : 0) : 0;
+ $notifypm = (isset($_POST['notifypm'])) ? (($_POST['notifypm']) ? TRUE : 0) : TRUE;
+ $popuppm = (isset($_POST['popup_pm'])) ? (($_POST['popup_pm']) ? TRUE : 0) : TRUE;
- if ( $mode == 'register' )
+ if ($mode == 'register')
{
- $attachsig = ( isset($_POST['attachsig']) ) ? ( ($_POST['attachsig']) ? TRUE : 0 ) : $config['allow_sig'];
+ $attachsig = (isset($_POST['attachsig'])) ? (($_POST['attachsig']) ? TRUE : 0) : $config['allow_sig'];
- $allowhtml = ( isset($_POST['allowhtml']) ) ? ( ($_POST['allowhtml']) ? TRUE : 0 ) : $config['allow_html'];
- $allowbbcode = ( isset($_POST['allowbbcode']) ) ? ( ($_POST['allowbbcode']) ? TRUE : 0 ) : $config['allow_bbcode'];
- $allowsmilies = ( isset($_POST['allowsmilies']) ) ? ( ($_POST['allowsmilies']) ? TRUE : 0 ) : $config['allow_smilies'];
+ $allowhtml = (isset($_POST['allowhtml'])) ? (($_POST['allowhtml']) ? TRUE : 0) : $config['allow_html'];
+ $allowbbcode = (isset($_POST['allowbbcode'])) ? (($_POST['allowbbcode']) ? TRUE : 0) : $config['allow_bbcode'];
+ $allowsmilies = (isset($_POST['allowsmilies'])) ? (($_POST['allowsmilies']) ? TRUE : 0) : $config['allow_smilies'];
}
else
{
- $attachsig = ( isset($_POST['attachsig']) ) ? ( ($_POST['attachsig']) ? TRUE : 0 ) : 0;
+ $attachsig = (isset($_POST['attachsig'])) ? (($_POST['attachsig']) ? TRUE : 0) : 0;
- $allowhtml = ( isset($_POST['allowhtml']) ) ? ( ($_POST['allowhtml']) ? TRUE : 0 ) : $user->data['user_allowhtml'];
- $allowbbcode = ( isset($_POST['allowbbcode']) ) ? ( ($_POST['allowbbcode']) ? TRUE : 0 ) : $user->data['user_allowbbcode'];
- $allowsmilies = ( isset($_POST['allowsmilies']) ) ? ( ($_POST['allowsmilies']) ? TRUE : 0 ) : $user->data['user_allowsmiles'];
+ $allowhtml = (isset($_POST['allowhtml'])) ? (($_POST['allowhtml']) ? TRUE : 0) : $user->data['user_allowhtml'];
+ $allowbbcode = (isset($_POST['allowbbcode'])) ? (($_POST['allowbbcode']) ? TRUE : 0) : $user->data['user_allowbbcode'];
+ $allowsmilies = (isset($_POST['allowsmilies'])) ? (($_POST['allowsmilies']) ? TRUE : 0) : $user->data['user_allowsmiles'];
}
- $user_style = ( isset($_POST['style']) ) ? intval($_POST['style']) : $config['default_style'];
+ $user_style = (isset($_POST['style'])) ? intval($_POST['style']) : $config['default_style'];
- if ( !empty($_POST['language']) )
+ if (!empty($_POST['language']))
{
- if ( preg_match('/^[a-z_]+$/i', $_POST['language']) )
+ if (preg_match('/^[a-z_]+$/i', $_POST['language']))
{
$user_lang = $_POST['language'];
}
@@ -161,8 +161,8 @@ if (isset($_POST['submit']) || $mode == 'register')
$user_lang = $config['default_lang'];
}
- $user_timezone = ( isset($_POST['timezone']) ) ? doubleval($_POST['timezone']) : $config['board_timezone'];
- $user_dateformat = ( !empty($_POST['dateformat']) ) ? trim($_POST['dateformat']) : $config['default_dateformat'];
+ $user_timezone = (isset($_POST['timezone'])) ? doubleval($_POST['timezone']) : $config['board_timezone'];
+ $user_dateformat = (!empty($_POST['dateformat'])) ? trim($_POST['dateformat']) : $config['default_dateformat'];
}
@@ -172,40 +172,40 @@ if (isset($_POST['submit']) || $mode == 'register')
if (isset($_POST['submit']))
{
$passwd_sql = '';
- if ( $mode == 'editprofile' )
+ if ($mode == 'editprofile')
{
- if ( $user_id != $user->data['user_id'] )
+ if ($user_id != $user->data['user_id'])
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Wrong_Profile'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Wrong_Profile'];
}
}
- else if ( $mode == 'register' )
+ else if ($mode == 'register')
{
- if ( empty($username) || empty($password) || empty($password_confirm) || empty($email) )
+ if (empty($username) || empty($password) || empty($password_confirm) || empty($email))
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Fields_empty'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Fields_empty'];
}
}
$passwd_sql = '';
- if ( !empty($password) && !empty($password_confirm) )
+ if (!empty($password) && !empty($password_confirm))
{
- if ( $password != $password_confirm )
+ if ($password != $password_confirm)
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Password_mismatch'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Password_mismatch'];
}
- else if ( strlen($password) > 32 )
+ else if (strlen($password) > 32)
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Password_long'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Password_long'];
}
else
{
- if ( $mode == 'editprofile' )
+ if ($mode == 'editprofile')
{
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
@@ -214,24 +214,24 @@ if (isset($_POST['submit']))
$row = $db->sql_fetchrow($result);
- if ( $row['user_password'] != md5($password_current) )
+ if ($row['user_password'] != md5($password_current))
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Current_password_mismatch'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Current_password_mismatch'];
}
}
- if ( !$error )
+ if (!$error)
{
$password = md5($password);
$passwd_sql = "user_password = '$password', ";
}
}
}
- else if ( ( empty($password) && !empty($password_confirm) ) || ( !empty($password) && empty($password_confirm) ) )
+ else if ((empty($password) && !empty($password_confirm)) || (!empty($password) && empty($password_confirm)))
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Password_mismatch'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Password_mismatch'];
}
else
{
@@ -241,17 +241,17 @@ if (isset($_POST['submit']))
//
// Do a ban check on this email address
//
- if ( $email != $user->data['user_email'] || $mode == 'register' )
+ if ($email != $user->data['user_email'] || $mode == 'register')
{
if (($result = validate_email($email)) != false)
{
$email = $user->data['user_email'];
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result;
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $result;
}
- if ( $mode == 'editprofile' )
+ if ($mode == 'editprofile')
{
$sql = "SELECT user_password
FROM " . USERS_TABLE . "
@@ -260,30 +260,30 @@ if (isset($_POST['submit']))
$row = $db->sql_fetchrow($result);
- if ( $row['user_password'] != md5($password_current) )
+ if ($row['user_password'] != md5($password_current))
{
$email = $user->data['user_email'];
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Current_password_mismatch'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Current_password_mismatch'];
}
}
}
$username_sql = '';
- if ( $config['allow_namechange'] || $mode == 'register' )
+ if ($config['allow_namechange'] || $mode == 'register')
{
- if ( empty($username) )
+ if (empty($username))
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Username_disallowed'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Username_disallowed'];
}
- else if ( $username != $user->data['username'] || $mode == 'register' )
+ else if ($username != $user->data['username'] || $mode == 'register')
{
if (($result = validate_username($username)) != false)
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result;
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $result;
}
else
{
@@ -299,33 +299,33 @@ if (isset($_POST['submit']))
}
}
- if ( $signature != '' )
+ if ($signature != '')
{
- if ( strlen($signature) > $config['max_sig_chars'] )
+ if (strlen($signature) > $config['max_sig_chars'])
{
$error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Signature_too_long'];
+ $error_msg .= ((isset($error_msg)) ? '<br />' : '') . $user->lang['Signature_too_long'];
}
- if ( $signature_bbcode_uid == '' )
+ if ($signature_bbcode_uid == '')
{
-// $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
+// $signature_bbcode_uid = ($allowbbcode) ? make_bbcode_uid() : '';
}
// $signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
}
- if ( !$error )
+ if (!$error)
{
- if ( ( ( $mode == 'editprofile' && $auth->acl_get('a_') && $email != $current_email ) || ( $mode == 'register' || $coppa ) ) && ( $config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN ) )
+ if ((($mode == 'editprofile' && $auth->acl_get('a_') && $email != $current_email) || ($mode == 'register' || $coppa)) && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
{
$user_actkey = gen_rand_string(true);
$key_len = 54 - (strlen($server_url));
- $key_len = ( $key_len > 6 ) ? $key_len : 6;
+ $key_len = ($key_len > 6) ? $key_len : 6;
$user_actkey = substr($user_actkey, 0, $key_len);
$user_active = 0;
- if ( $user->data['user_id'] != ANONYMOUS )
+ if ($user->data['user_id'] != ANONYMOUS)
{
$user->destroy();
}
@@ -378,12 +378,18 @@ if (isset($_POST['submit']))
if ($config['newest_user_id'] == $user_id)
{
$sql = 'UPDATE ' . CONFIG_TABLE . "
- SET config_value = '" . sql_quote($username) . "'
- WHERE config_name = 'newest_username'";
+ SET config_value = '" . sql_quote($username) . "'
+ WHERE config_name = 'newest_username'";
$db->sql_query($sql);
}
- if ( !$user_active )
+ // Update moderator cache table as appropriate
+ $sql = 'UPDATE ' . CONFIG_TABLE . "
+ SET username = '" . sql_quote($username) . "'
+ WHERE user_id = $user_id";
+ $db->sql_query($sql);
+
+ if (!$user_active)
{
//
// The users account has been deactivated, send them an email with a new activation key
@@ -429,7 +435,7 @@ if (isset($_POST['submit']))
$user_id = $db->sql_nextid();
// Place into appropriate group, either REGISTERED or INACTIVE depending on config
- $group_name = ( $config['require_activation'] == USER_ACTIVATION_NONE ) ? 'REGISTERED' : 'INACTIVE';
+ $group_name = ($config['require_activation'] == USER_ACTIVATION_NONE) ? 'REGISTERED' : 'INACTIVE';
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending) SELECT $user_id, group_id, 0 FROM " . GROUPS_TABLE . " WHERE group_name = '$group_name'";
$result = $db->sql_query($sql);
@@ -452,17 +458,17 @@ if (isset($_POST['submit']))
$db->sql_transaction('commit');
- if ( $coppa )
+ if ($coppa)
{
$message = $user->lang['COPPA'];
$email_template = 'coppa_welcome_inactive';
}
- else if ( $config['require_activation'] == USER_ACTIVATION_SELF )
+ else if ($config['require_activation'] == USER_ACTIVATION_SELF)
{
$message = $user->lang['Account_inactive'];
$email_template = 'user_welcome_inactive';
}
- else if ( $config['require_activation'] == USER_ACTIVATION_ADMIN )
+ else if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
$message = $user->lang['Account_inactive_admin'];
$email_template = 'admin_welcome_inactive';
@@ -523,7 +529,7 @@ if (isset($_POST['submit']))
$emailer->send();
$emailer->reset();
- if ( $config['require_activation'] == USER_ACTIVATION_ADMIN )
+ if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
$emailer->use_template("admin_activate", stripslashes($user_lang));
$emailer->email_address($config['board_email']);
@@ -548,7 +554,7 @@ if (isset($_POST['submit']))
} // End of submit
-if ( $error )
+if ($error)
{
//
// If an error occured we need to stripslashes on returned data
@@ -572,7 +578,7 @@ if ( $error )
$user_lang = stripslashes($user_lang);
$user_dateformat = stripslashes($user_dateformat);
}
-else if ( $mode == 'editprofile' )
+else if ($mode == 'editprofile')
{
$user_id = $user->data['user_id'];
$username = htmlspecialchars($user->data['username']);
@@ -590,7 +596,7 @@ else if ( $mode == 'editprofile' )
$occupation = htmlspecialchars($user->data['user_occ']);
$interests = htmlspecialchars($user->data['user_interests']);
$signature_bbcode_uid = $user->data['user_sig_bbcode_uid'];
- $signature = ( $signature_bbcode_uid != '' ) ? preg_replace("/\:(([a-z0-9]:)?)$signature_bbcode_uid/si", '', $user->data['user_sig']) : $user->data['user_sig'];
+ $signature = ($signature_bbcode_uid != '') ? preg_replace("/\:(([a-z0-9]:)?)$signature_bbcode_uid/si", '', $user->data['user_sig']) : $user->data['user_sig'];
$viewemail = $user->data['user_viewemail'];
$notifypm = $user->data['user_notify_pm'];
@@ -612,9 +618,9 @@ else if ( $mode == 'editprofile' )
// Default pages
//
-if ( $mode == 'editprofile' )
+if ($mode == 'editprofile')
{
- if ( $user_id != $user->data['user_id'] )
+ if ($user_id != $user->data['user_id'])
{
$error = TRUE;
$error_msg = $user->lang['Wrong_Profile'];
@@ -622,12 +628,12 @@ if ( $mode == 'editprofile' )
}
- if ( !isset($coppa) )
+ if (!isset($coppa))
{
$coppa = FALSE;
}
- if ( !isset($user_template) )
+ if (!isset($user_template))
{
$selected_template = $config['system_template'];
}
@@ -635,7 +641,7 @@ if ( $mode == 'editprofile' )
$signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature);
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
- if( $mode == 'editprofile' )
+ if($mode == 'editprofile')
{
$s_hidden_fields .= '<input type="hidden" name="user_id" value="' . $user->data['user_id'] . '" />';
//
@@ -645,14 +651,14 @@ if ( $mode == 'editprofile' )
$s_hidden_fields .= '<input type="hidden" name="current_email" value="' . $user->data['user_email'] . '" />';
}
- if ( !empty($user_avatar_local) )
+ if (!empty($user_avatar_local))
{
$s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $user_avatar_local . '" />';
}
- $html_status = ( $user->data['user_allowhtml'] && $config['allow_html'] ) ? $user->lang['HTML_is_ON'] : $user->lang['HTML_is_OFF'];
- $bbcode_status = ( $user->data['user_allowbbcode'] && $config['allow_bbcode'] ) ? $user->lang['BBCode_is_ON'] : $user->lang['BBCode_is_OFF'];
- $smilies_status = ( $user->data['user_allowsmile'] && $config['allow_smilies'] ) ? $user->lang['Smilies_are_ON'] : $user->lang['Smilies_are_OFF'];
+ $html_status = ($user->data['user_allowhtml'] && $config['allow_html']) ? $user->lang['HTML_is_ON'] : $user->lang['HTML_is_OFF'];
+ $bbcode_status = ($user->data['user_allowbbcode'] && $config['allow_bbcode'] ) ? $user->lang['BBCode_is_ON'] : $user->lang['BBCode_is_OFF'];
+ $smilies_status = ($user->data['user_allowsmile'] && $config['allow_smilies'] ) ? $user->lang['Smilies_are_ON'] : $user->lang['Smilies_are_OFF'];
//
// Let's do an overall check for settings/versions which would prevent
@@ -672,24 +678,24 @@ if ( $mode == 'editprofile' )
'LOCATION' => $location,
'WEBSITE' => $website,
'SIGNATURE' => str_replace('<br />', "\n", $signature),
- 'VIEW_EMAIL_YES' => ( $viewemail ) ? 'checked="checked"' : '',
- 'VIEW_EMAIL_NO' => ( !$viewemail ) ? 'checked="checked"' : '',
- 'HIDE_USER_YES' => ( !$allowviewonline ) ? 'checked="checked"' : '',
- 'HIDE_USER_NO' => ( $allowviewonline ) ? 'checked="checked"' : '',
- 'NOTIFY_PM_YES' => ( $notifypm ) ? 'checked="checked"' : '',
- 'NOTIFY_PM_NO' => ( !$notifypm ) ? 'checked="checked"' : '',
- 'POPUP_PM_YES' => ( $popuppm ) ? 'checked="checked"' : '',
- 'POPUP_PM_NO' => ( !$popuppm ) ? 'checked="checked"' : '',
- 'ALWAYS_ADD_SIGNATURE_YES' => ( $attachsig ) ? 'checked="checked"' : '',
- 'ALWAYS_ADD_SIGNATURE_NO' => ( !$attachsig ) ? 'checked="checked"' : '',
- 'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '',
- 'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '',
- 'ALWAYS_ALLOW_BBCODE_YES' => ( $allowbbcode ) ? 'checked="checked"' : '',
- 'ALWAYS_ALLOW_BBCODE_NO' => ( !$allowbbcode ) ? 'checked="checked"' : '',
- 'ALWAYS_ALLOW_HTML_YES' => ( $allowhtml ) ? 'checked="checked"' : '',
- 'ALWAYS_ALLOW_HTML_NO' => ( !$allowhtml ) ? 'checked="checked"' : '',
- 'ALWAYS_ALLOW_SMILIES_YES' => ( $allowsmilies ) ? 'checked="checked"' : '',
- 'ALWAYS_ALLOW_SMILIES_NO' => ( !$allowsmilies ) ? 'checked="checked"' : '',
+ 'VIEW_EMAIL_YES' => ($viewemail) ? 'checked="checked"' : '',
+ 'VIEW_EMAIL_NO' => (!$viewemail) ? 'checked="checked"' : '',
+ 'HIDE_USER_YES' => (!$allowviewonline) ? 'checked="checked"' : '',
+ 'HIDE_USER_NO' => ($allowviewonline) ? 'checked="checked"' : '',
+ 'NOTIFY_PM_YES' => ($notifypm) ? 'checked="checked"' : '',
+ 'NOTIFY_PM_NO' => (!$notifypm) ? 'checked="checked"' : '',
+ 'POPUP_PM_YES' => ($popuppm) ? 'checked="checked"' : '',
+ 'POPUP_PM_NO' => (!$popuppm) ? 'checked="checked"' : '',
+ 'ALWAYS_ADD_SIGNATURE_YES' => ($attachsig) ? 'checked="checked"' : '',
+ 'ALWAYS_ADD_SIGNATURE_NO' => (!$attachsig) ? 'checked="checked"' : '',
+ 'NOTIFY_REPLY_YES' => ($notifyreply) ? 'checked="checked"' : '',
+ 'NOTIFY_REPLY_NO' => (!$notifyreply) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_BBCODE_YES' => ($allowbbcode) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_BBCODE_NO' => (!$allowbbcode) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_HTML_YES' => ($allowhtml) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_HTML_NO' => (!$allowhtml) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_SMILIES_YES' => ($allowsmilies) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
'LANGUAGE_SELECT' => language_select($user_lang, 'language'),
'STYLE_SELECT' => style_select($user_style, 'style'),
'TIMEZONE_SELECT' => tz_select($user_timezone, 'timezone'),
@@ -699,11 +705,11 @@ if ( $mode == 'editprofile' )
'SMILIES_STATUS' => $smilies_status,
'L_CURRENT_PASSWORD' => $user->lang['Current_password'],
- 'L_NEW_PASSWORD' => ( $mode == 'register' ) ? $user->lang['Password'] : $user->lang['New_password'],
+ 'L_NEW_PASSWORD' => ($mode == 'register') ? $user->lang['Password'] : $user->lang['New_password'],
'L_CONFIRM_PASSWORD' => $user->lang['Confirm_password'],
- 'L_CONFIRM_PASSWORD_EXPLAIN' => ( $mode == 'editprofile' ) ? $user->lang['Confirm_password_explain'] : '',
- 'L_PASSWORD_IF_CHANGED' => ( $mode == 'editprofile' ) ? $user->lang['password_if_changed'] : '',
- 'L_PASSWORD_CONFIRM_IF_CHANGED' => ( $mode == 'editprofile' ) ? $user->lang['password_confirm_if_changed'] : '',
+ 'L_CONFIRM_PASSWORD_EXPLAIN' => ($mode == 'editprofile') ? $user->lang['Confirm_password_explain'] : '',
+ 'L_PASSWORD_IF_CHANGED' => ($mode == 'editprofile') ? $user->lang['password_if_changed'] : '',
+ 'L_PASSWORD_CONFIRM_IF_CHANGED' => ($mode == 'editprofile') ? $user->lang['password_confirm_if_changed'] : '',
'L_SUBMIT' => $user->lang['Submit'],
'L_RESET' => $user->lang['Reset'],
'L_ICQ_NUMBER' => $user->lang['ICQ'],
@@ -742,7 +748,7 @@ if ( $mode == 'editprofile' )
'L_PROFILE_INFO_NOTICE' => $user->lang['Profile_info_warn'],
'L_EMAIL_ADDRESS' => $user->lang['Email_address'],
- 'S_PROFILE_EDIT' => ( $mode == 'editprofile' ) ? true : false,
+ 'S_PROFILE_EDIT' => ($mode == 'editprofile') ? true : false,
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_FORM_ENCTYPE' => $form_enctype,
'S_PROFILE_ACTION' => "profile.$phpEx$SID")