Vergleich member.php - 1.8.0 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 15Zeile 15

$nosession['avatar'] = 1;
$templatelist = "member_register,member_register_hiddencaptcha,member_coppa_form,member_register_coppa,member_register_agreement_coppa,member_register_agreement,usercp_options_tppselect,usercp_options_pppselect,member_register_referrer,member_register_customfield,member_register_requiredfields";


$nosession['avatar'] = 1;
$templatelist = "member_register,member_register_hiddencaptcha,member_coppa_form,member_register_coppa,member_register_agreement_coppa,member_register_agreement,usercp_options_tppselect,usercp_options_pppselect,member_register_referrer,member_register_customfield,member_register_requiredfields";

$templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,member_register_regimage_ayah,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_ayah,member_profile_addremove,member_emailuser_guest";

$templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,member_register_regimage_nocaptcha,member_register_regimage_ayah,post_captcha_hidden,post_captcha,post_captcha_recaptcha,post_captcha_ayah,member_profile_addremove,member_emailuser_guest";

$templatelist .= ",member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_viewnotes";
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_resendactivation,member_lostpw,member_register_additionalfields,member_register_password,usercp_options_pppselect_option";
$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer,postbit_reputation_formatted,postbit_warninglevel_formatted";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox,usercp_profile_profilefields_text,usercp_options_tppselect_option";
$templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_register_language,member_profile_userstar,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi,member_register_day";

$templatelist .= ",member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_viewnotes";
$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_resendactivation,member_lostpw,member_register_additionalfields,member_register_password,usercp_options_pppselect_option";
$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer,postbit_reputation_formatted,postbit_warninglevel_formatted";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox,usercp_profile_profilefields_text,usercp_options_tppselect_option";
$templatelist .= ",member_register_question,member_register_question_refresh,usercp_options_timezone,usercp_options_timezone_option,usercp_options_language_option,member_register_language,member_profile_userstar,member_profile_customfields_field_multi_item,member_profile_customfields_field_multi,member_register_day";

$templatelist .= ",member_profile_contact_fields_aim,member_profile_contact_fields_google,member_profile_contact_fields_icq,member_profile_contact_fields_skype,member_profile_contact_fields_yahoo,member_profile_pm,member_profile_contact_details,member_emailuser_hidden";

$templatelist .= ",member_profile_contact_fields_aim,member_profile_contact_fields_google,member_profile_contact_fields_icq,member_profile_contact_fields_skype,member_profile_contact_fields_yahoo,member_profile_pm,member_profile_contact_details,member_emailuser_hidden,member_profile_banned";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 96Zeile 96
		if(isset($mybb->input['regtime']))
{
// Check how long it took for this person to register

		if(isset($mybb->input['regtime']))
{
// Check how long it took for this person to register

			$timetook = TIME_NOW - $mybb->get_input('regtime', 1);

			$timetook = TIME_NOW - $mybb->get_input('regtime', MyBB::INPUT_INT);


// See if they registered faster than normal
if($timetook < $mybb->settings['regtime'])


// See if they registered faster than normal
if($timetook < $mybb->settings['regtime'])

Zeile 129Zeile 129
		$mybb->input['password2'] = $mybb->input['password'];
}


		$mybb->input['password2'] = $mybb->input['password'];
}


	if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', 1) == 1)

	if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', MyBB::INPUT_INT) == 1)

	{
$usergroup = 5;
}

	{
$usergroup = 5;
}

Zeile 159Zeile 159
		"referrer" => $mybb->get_input('referrername'),
"timezone" => $mybb->get_input('timezoneoffset'),
"language" => $mybb->get_input('language'),

		"referrer" => $mybb->get_input('referrername'),
"timezone" => $mybb->get_input('timezoneoffset'),
"language" => $mybb->get_input('language'),

		"profile_fields" => $mybb->get_input('profile_fields', 2),

		"profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY),

		"regip" => $session->packedip,
"coppa_user" => $coppauser,
"regcheck1" => $mybb->get_input('regcheck1'),

		"regip" => $session->packedip,
"coppa_user" => $coppauser,
"regcheck1" => $mybb->get_input('regcheck1'),

Zeile 179Zeile 179
	}

$user['options'] = array(

	}

$user['options'] = array(

		"allownotices" => $mybb->get_input('allownotices', 1),
"hideemail" => $mybb->get_input('hideemail', 1),
"subscriptionmethod" => $mybb->get_input('subscriptionmethod', 1),
"receivepms" => $mybb->get_input('receivepms', 1),
"pmnotice" => $mybb->get_input('pmnotice', 1),
"pmnotify" => $mybb->get_input('pmnotify', 1),
"invisible" => $mybb->get_input('invisible', 1),

		"allownotices" => $mybb->get_input('allownotices', MyBB::INPUT_INT),
"hideemail" => $mybb->get_input('hideemail', MyBB::INPUT_INT),
"subscriptionmethod" => $mybb->get_input('subscriptionmethod', MyBB::INPUT_INT),
"receivepms" => $mybb->get_input('receivepms', MyBB::INPUT_INT),
"pmnotice" => $mybb->get_input('pmnotice', MyBB::INPUT_INT),
"pmnotify" => $mybb->get_input('pmnotify', MyBB::INPUT_INT),
"invisible" => $mybb->get_input('invisible', MyBB::INPUT_INT),

		"dstcorrection" => $mybb->get_input('dstcorrection')
);


		"dstcorrection" => $mybb->get_input('dstcorrection')
);


Zeile 214Zeile 214
		try {
if($stop_forum_spam_checker->is_user_a_spammer($user['username'], $user['email'], get_ip()))
{

		try {
if($stop_forum_spam_checker->is_user_a_spammer($user['username'], $user['email'], get_ip()))
{

				error($lang->error_stop_forum_spam_spammer);






				error($lang->sprintf($lang->error_stop_forum_spam_spammer,
$stop_forum_spam_checker->getErrorText(array(
'stopforumspam_check_usernames',
'stopforumspam_check_emails',
'stopforumspam_check_ips'
))));

			}
}
catch (Exception $e)

			}
}
catch (Exception $e)

Zeile 244Zeile 249
	// If we have a security question, check to see if answer is correct
if($mybb->settings['securityquestion'])
{

	// If we have a security question, check to see if answer is correct
if($mybb->settings['securityquestion'])
{

		$question_id = $mybb->get_input('question_id');

		$question_id = $db->escape_string($mybb->get_input('question_id'));

		$answer = $db->escape_string($mybb->get_input('answer'));

$query = $db->query("

		$answer = $db->escape_string($mybb->get_input('answer'));

$query = $db->query("

Zeile 298Zeile 303
		$allownoticescheck = $hideemailcheck = $no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = '';
$receivepmscheck = $pmnoticecheck = $pmnotifycheck = $invisiblecheck = $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = '';


		$allownoticescheck = $hideemailcheck = $no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = '';
$receivepmscheck = $pmnoticecheck = $pmnotifycheck = $invisiblecheck = $dst_auto_selected = $dst_enabled_selected = $dst_disabled_selected = '';


		if($mybb->get_input('allownotices', 1) == 1)

		if($mybb->get_input('allownotices', MyBB::INPUT_INT) == 1)

		{
$allownoticescheck = "checked=\"checked\"";
}


		{
$allownoticescheck = "checked=\"checked\"";
}


		if($mybb->get_input('hideemail', 1) == 1)

		if($mybb->get_input('hideemail', MyBB::INPUT_INT) == 1)

		{
$hideemailcheck = "checked=\"checked\"";
}


		{
$hideemailcheck = "checked=\"checked\"";
}


		if($mybb->get_input('subscriptionmethod', 1) == 1)

		if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 1)

		{
$no_subscribe_selected = "selected=\"selected\"";
}

		{
$no_subscribe_selected = "selected=\"selected\"";
}

		else if($mybb->get_input('subscriptionmethod', 1) == 2)

		else if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 2)

		{
$instant_email_subscribe_selected = "selected=\"selected\"";
}

		{
$instant_email_subscribe_selected = "selected=\"selected\"";
}

		else if($mybb->get_input('subscriptionmethod', 1) == 3)

		else if($mybb->get_input('subscriptionmethod', MyBB::INPUT_INT) == 3)

		{
$instant_pm_subscribe_selected = "selected=\"selected\"";
}

		{
$instant_pm_subscribe_selected = "selected=\"selected\"";
}

Zeile 325Zeile 330
			$no_auto_subscribe_selected = "selected=\"selected\"";
}


			$no_auto_subscribe_selected = "selected=\"selected\"";
}


		if($mybb->get_input('receivepms', 1) == 1)

		if($mybb->get_input('receivepms', MyBB::INPUT_INT) == 1)

		{
$receivepmscheck = "checked=\"checked\"";
}


		{
$receivepmscheck = "checked=\"checked\"";
}


		if($mybb->get_input('pmnotice', 1) == 1)

		if($mybb->get_input('pmnotice', MyBB::INPUT_INT) == 1)

		{
$pmnoticecheck = " checked=\"checked\"";
}


		{
$pmnoticecheck = " checked=\"checked\"";
}


		if($mybb->get_input('pmnotify', 1) == 1)

		if($mybb->get_input('pmnotify', MyBB::INPUT_INT) == 1)

		{
$pmnotifycheck = "checked=\"checked\"";
}


		{
$pmnotifycheck = "checked=\"checked\"";
}


		if($mybb->get_input('invisible', 1) == 1)

		if($mybb->get_input('invisible', MyBB::INPUT_INT) == 1)

		{
$invisiblecheck = "checked=\"checked\"";
}


		{
$invisiblecheck = "checked=\"checked\"";
}


		if($mybb->get_input('dstcorrection', 1) == 2)

		if($mybb->get_input('dstcorrection', MyBB::INPUT_INT) == 2)

		{
$dst_auto_selected = "selected=\"selected\"";
}

		{
$dst_auto_selected = "selected=\"selected\"";
}

		else if($mybb->get_input('dstcorrection', 1) == 1)

		else if($mybb->get_input('dstcorrection', MyBB::INPUT_INT) == 1)

		{
$dst_enabled_selected = "selected=\"selected\"";
}

		{
$dst_enabled_selected = "selected=\"selected\"";
}

Zeile 678Zeile 683
	{
$bdaysel = $bday2blank = '';
}

	{
$bdaysel = $bday2blank = '';
}

	$mybb->input['bday1'] = $mybb->get_input('bday1', 1);

	$mybb->input['bday1'] = $mybb->get_input('bday1', MyBB::INPUT_INT);

	for($day = 1; $day <= 31; ++$day)
{
$selected = '';

	for($day = 1; $day <= 31; ++$day)
{
$selected = '';

Zeile 690Zeile 695
		eval("\$bdaysel .= \"".$templates->get("member_register_day")."\";");
}


		eval("\$bdaysel .= \"".$templates->get("member_register_day")."\";");
}


	$mybb->input['bday2'] = $mybb->get_input('bday2', 1);

	$mybb->input['bday2'] = $mybb->get_input('bday2', MyBB::INPUT_INT);

	$bdaymonthsel = array();
foreach(range(1, 12) as $number)
{
$bdaymonthsel[$number] = '';
}
$bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";

	$bdaymonthsel = array();
foreach(range(1, 12) as $number)
{
$bdaymonthsel[$number] = '';
}
$bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";

	$mybb->input['bday3'] = $mybb->get_input('bday3', 1);

	$mybb->input['bday3'] = $mybb->get_input('bday3', MyBB::INPUT_INT);


if($mybb->input['bday3'] == 0)
{


if($mybb->input['bday3'] == 0)
{

Zeile 851Zeile 856
		{
$referrer = '';
}

		{
$referrer = '';
}

		$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', 2);

		$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);

		// Custom profile fields baby!
$altbg = "trow1";
$requiredfields = $customfields = '';


		// Custom profile fields baby!
$altbg = "trow1";
$requiredfields = $customfields = '';


		if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', 1) == 1)

		if($mybb->settings['regtype'] == "verify" || $mybb->settings['regtype'] == "admin" || $mybb->settings['regtype'] == "both" || $mybb->get_input('coppa', MyBB::INPUT_INT) == 1)

		{
$usergroup = 5;
}

		{
$usergroup = 5;
}

Zeile 871Zeile 876
		{
foreach($pfcache as $profilefield)
{

		{
foreach($pfcache as $profilefield)
{

				if($profilefield['required'] != 1 && $profilefield['registration'] != 1 || $profilefield['editableby'] == '' || $profilefield['editableby'] && $profilefield['editableby'] != -1 && !is_member($profilefield['editableby'], array('usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup)))

				if($profilefield['required'] != 1 && $profilefield['registration'] != 1 || !is_member($profilefield['editableby'], array('usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $usergroup)))

				{
continue;
}


				{
continue;
}


 
				$code = $select = $val = $options = $expoptions = $useropts = $seloptions = '';

				$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$thing = explode("\n", $profilefield['type'], "2");
$type = trim($thing[0]);

				$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$thing = explode("\n", $profilefield['type'], "2");
$type = trim($thing[0]);

Zeile 918Zeile 924
							$sel = "";
if($val == $seloptions[$val])
{

							$sel = "";
if($val == $seloptions[$val])
{

								$sel = " selected=\"selected\"";

								$sel = ' selected="selected"';

							}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");

							}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");

Zeile 943Zeile 949
							$sel = "";
if($val == $userfield)
{

							$sel = "";
if($val == $userfield)
{

								$sel = " selected=\"selected\"";

								$sel = ' selected="selected"';

							}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");

							}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");

Zeile 966Zeile 972
							$checked = "";
if($val == $userfield)
{

							$checked = "";
if($val == $userfield)
{

								$checked = "checked=\"checked\"";

								$checked = 'checked="checked"';

							}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");

							}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_radio")."\";");

Zeile 998Zeile 1004
							$checked = "";
if($val == $seloptions[$val])
{

							$checked = "";
if($val == $seloptions[$val])
{

								$checked = "checked=\"checked\"";

								$checked = 'checked="checked"';

							}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");

							}

eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");

Zeile 1024Zeile 1030

if($profilefield['required'] == 1)
{


if($profilefield['required'] == 1)
{

					// JS validator extra
if($type == "checkbox" || $type == "radio")

					// JS validator extra, choose correct selectors for everything except single select which always has value
if($type != 'select')

					{

					{

						$id = "{$field}0";
}
else
{
$id = "fid{$profilefield['fid']}";
}

$validator_extra .= "
$(\"#{$id}\").rules(\"add\", {
required: true,
minlength: 1,
messages: {
required: \"{$lang->js_validator_not_empty}\"



						if($type == "textarea")
{
$inp_selector = "$('textarea[name=\"profile_fields[{$field}]\"')";
}
elseif($type == "multiselect")
{
$inp_selector = "$('select[name=\"profile_fields[{$field}][]\"')";
}
elseif($type == "checkbox")
{
$inp_selector = "$('input[name=\"profile_fields[{$field}][]\"')";
}
else
{
$inp_selector = "$('input[name=\"profile_fields[{$field}]\"')";

						}

						}

					});\n";









						
$validator_extra .= "
{$inp_selector}.rules('add', {
required: true,
messages: {
required: '{$lang->js_validator_not_empty}'
}
});\n";
}


eval("\$requiredfields .= \"".$templates->get("member_register_customfield")."\";");
}
else


eval("\$requiredfields .= \"".$templates->get("member_register_customfield")."\";");
}
else

				{

				{

					eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";");
}

					eval("\$customfields .= \"".$templates->get("member_register_customfield")."\";");
}


$code = '';
$select = '';
$val = '';
$options = '';
$expoptions = '';
$useropts = '';
$seloptions = '';

 
			}

			}

		}

		}


if(!empty($requiredfields))


if(!empty($requiredfields))

		{
eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";");
}
if(!empty($customfields))
{

		{
eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";");
}
if(!empty($customfields))
{

			eval("\$customfields = \"".$templates->get("member_register_additionalfields")."\";");
}
if(!isset($fromreg))

			eval("\$customfields = \"".$templates->get("member_register_additionalfields")."\";");
}
if(!isset($fromreg))

Zeile 1078Zeile 1086
			$pmnotifycheck = '';
$invisiblecheck = '';
if($mybb->settings['dstcorrection'] == 1)

			$pmnotifycheck = '';
$invisiblecheck = '';
if($mybb->settings['dstcorrection'] == 1)

			{

			{

				$enabledstcheck = "checked=\"checked\"";
}
$no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = '';

				$enabledstcheck = "checked=\"checked\"";
}
$no_auto_subscribe_selected = $instant_email_subscribe_selected = $instant_pm_subscribe_selected = $no_subscribe_selected = '';

Zeile 1091Zeile 1099
		{
require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha(true, "member_register_regimage");

		{
require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha(true, "member_register_regimage");





			if($captcha->html)
{
$regimage = $captcha->html;

			if($captcha->html)
{
$regimage = $captcha->html;

Zeile 1100Zeile 1108
				{
// JS validator extra for our default CAPTCHA
$validator_extra .= "

				{
// JS validator extra for our default CAPTCHA
$validator_extra .= "

					$(\"#imagestring\").rules(\"add\", {

					$('#imagestring').rules('add', {

						required: true,
remote:{

						required: true,
remote:{

							url: \"xmlhttp.php?action=validate_captcha\",
type: \"post\",
dataType: \"json\",

							url: 'xmlhttp.php?action=validate_captcha',
type: 'post',
dataType: 'json',

							data:
{

							data:
{

								imagehash: $('#imagehash').val(),



								imagehash: function () {
return $('#imagehash').val();
},

								my_post_key: my_post_key

								my_post_key: my_post_key

							},

							},

						},
messages: {

						},
messages: {

							remote: \"{$lang->js_validator_no_image_text}\"

							remote: '{$lang->js_validator_no_image_text}'

						}
});\n";
}

						}
});\n";
}

Zeile 1147Zeile 1157
				eval("\$questionbox = \"".$templates->get("member_register_question")."\";");

$validator_extra .= "

				eval("\$questionbox = \"".$templates->get("member_register_question")."\";");

$validator_extra .= "

				$(\"#answer\").rules(\"add\", {

				$('#answer').rules('add', {

					required: true,
remote:{

					required: true,
remote:{

						url: \"xmlhttp.php?action=validate_question\",
type: \"post\",
dataType: \"json\",

						url: 'xmlhttp.php?action=validate_question',
type: 'post',
dataType: 'json',

						data:
{

						data:
{

							question: $('#question_id').val(),



							question: function () {
return $('#question_id').val();
},

							my_post_key: my_post_key
},
},
messages: {

							my_post_key: my_post_key
},
},
messages: {

						remote: \"{$lang->js_validator_no_security_question}\"

						remote: '{$lang->js_validator_no_security_question}'

					}
});\n";
}

					}
});\n";
}

Zeile 1185Zeile 1197
				$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']);

$validator_extra .= "

				$lang->password = $lang->complex_password = $lang->sprintf($lang->complex_password, $mybb->settings['minpasswordlength']);

$validator_extra .= "

				$(\"#password\").rules(\"add\", {

				$('#password').rules('add', {

					required: true,
minlength: {$mybb->settings['minpasswordlength']},
remote:{

					required: true,
minlength: {$mybb->settings['minpasswordlength']},
remote:{

						url: \"xmlhttp.php?action=complex_password\",
type: \"post\",
dataType: \"json\",

						url: 'xmlhttp.php?action=complex_password',
type: 'post',
dataType: 'json',

						data:
{
my_post_key: my_post_key
},
},
messages: {

						data:
{
my_post_key: my_post_key
},
},
messages: {

						minlength: \"{$lang->js_validator_password_length}\",
required: \"{$lang->js_validator_password_length}\",
remote: \"{$lang->js_validator_no_image_text}\"

						minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}',
remote: '{$lang->js_validator_no_image_text}'

					}
});\n";
}
else
{
$validator_extra .= "

					}
});\n";
}
else
{
$validator_extra .= "

				$(\"#password\").rules(\"add\", {

				$('#password').rules('add', {

					required: true,
minlength: {$mybb->settings['minpasswordlength']},
messages: {

					required: true,
minlength: {$mybb->settings['minpasswordlength']},
messages: {

						minlength: \"{$lang->js_validator_password_length}\",
required: \"{$lang->js_validator_password_length}\"

						minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}'

					}
});\n";
}

$validator_extra .= "

					}
});\n";
}

$validator_extra .= "

				$(\"#password2\").rules(\"add\", {

				$('#password2').rules('add', {

					required: true,
minlength: {$mybb->settings['minpasswordlength']},

					required: true,
minlength: {$mybb->settings['minpasswordlength']},

					equalTo: \"#password\",

					equalTo: '#password',

					messages: {

					messages: {

						minlength: \"{$lang->js_validator_password_length}\",
required: \"{$lang->js_validator_password_length}\",
equalTo: \"{$lang->js_validator_password_matches}\"

						minlength: '{$lang->js_validator_password_length}',
required: '{$lang->js_validator_password_length}',
equalTo: '{$lang->js_validator_password_matches}'

					}
});\n";


					}
});\n";


Zeile 1302Zeile 1314
	}
else
{

	}
else
{

		$user = get_user($mybb->get_input('uid', 1));

		$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));

	}
if(isset($mybb->input['code']) && $user)
{

	}
if(isset($mybb->input['code']) && $user)
{

Zeile 1427Zeile 1439
			if($user['type'] == "b" && $user['validated'] == 1)
{
error($lang->error_activated_by_admin);

			if($user['type'] == "b" && $user['validated'] == 1)
{
error($lang->error_activated_by_admin);

			}

			}


if($user['usergroup'] == 5)
{


if($user['usergroup'] == 5)
{

Zeile 1565Zeile 1577
	}
else
{

	}
else
{

		$user = get_user($mybb->get_input('uid', 1));

		$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));

	}
if(isset($mybb->input['code']) && $user)
{

	}
if(isset($mybb->input['code']) && $user)
{

Zeile 1661Zeile 1673
		'imagestring' => $mybb->get_input('imagestring')
);


		'imagestring' => $mybb->get_input('imagestring')
);


	$user_loginattempts = get_user_by_username($user['username'], array('fields' => 'loginattempts'));






	$options = array(
'fields' => 'loginattempts',
'username_method' => (int)$mybb->settings['username_method'],
);

$user_loginattempts = get_user_by_username($user['username'], $options);

	$user['loginattempts'] = (int)$user_loginattempts['loginattempts'];

$loginhandler->set_data($user);

	$user['loginattempts'] = (int)$user_loginattempts['loginattempts'];

$loginhandler->set_data($user);

Zeile 1673Zeile 1690
		$mybb->request_method = "get";

my_setcookie('loginattempts', $logins + 1);

		$mybb->request_method = "get";

my_setcookie('loginattempts', $logins + 1);

		$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "LOWER(username) = '".$db->escape_string(my_strtolower($user['username']))."'", 1, true);

		$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "uid='".(int)$loginhandler->login_data['uid']."'", 1, true);


$errors = $loginhandler->get_friendly_errors();



$errors = $loginhandler->get_friendly_errors();


		$user_loginattempts = get_user_by_username($user['username'], array('fields' => 'loginattempts'));
$user['loginattempts'] = (int)$user_loginattempts['loginattempts'];

		$user['loginattempts'] = (int)$loginhandler->login_data['loginattempts'];



// If we need a captcha set it here
if($mybb->settings['failedcaptchalogincount'] > 0 && ($user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))


// If we need a captcha set it here
if($mybb->settings['failedcaptchalogincount'] > 0 && ($user['loginattempts'] > $mybb->settings['failedcaptchalogincount'] || (int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']))

Zeile 1693Zeile 1709
		if($loginhandler->login_data['coppauser'])
{
error($lang->error_awaitingcoppa);

		if($loginhandler->login_data['coppauser'])
{
error($lang->error_awaitingcoppa);

		}

$loginhandler->complete_login();

$plugins->run_hooks("member_do_login_end");

		}

$loginhandler->complete_login();







		$mybb->input['url'] = $mybb->get_input('url');



		$plugins->run_hooks("member_do_login_end");

$mybb->input['url'] = $mybb->get_input('url');


if(!empty($mybb->input['url']) && my_strpos(basename($mybb->input['url']), 'member.php') === false)
{


if(!empty($mybb->input['url']) && my_strpos(basename($mybb->input['url']), 'member.php') === false)
{

Zeile 1712Zeile 1728

// Redirect to the URL if it is not member.php
redirect(htmlentities($mybb->input['url']), $lang->redirect_loggedin);


// Redirect to the URL if it is not member.php
redirect(htmlentities($mybb->input['url']), $lang->redirect_loggedin);

		}

		}

		else
{


		else
{


Zeile 1744Zeile 1760
		$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);
}
else

		$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);
}
else

	{

	{

		$redirect_url = '';
}


		$redirect_url = '';
}


Zeile 1760Zeile 1776
			if(!$correct)
{
$login_captcha->build_captcha();

			if(!$correct)
{
$login_captcha->build_captcha();

			}

			}

			else
{
$captcha = $login_captcha->build_hidden_captcha();

			else
{
$captcha = $login_captcha->build_hidden_captcha();

Zeile 1791Zeile 1807
	if(isset($mybb->input['password']) && $mybb->request_method == "post")
{
$password = htmlspecialchars_uni($mybb->get_input('password'));

	if(isset($mybb->input['password']) && $mybb->request_method == "post")
{
$password = htmlspecialchars_uni($mybb->get_input('password'));

	}


	}


	if(!empty($errors))
{
$mybb->input['action'] = "login";

	if(!empty($errors))
{
$mybb->input['action'] = "login";

Zeile 1837Zeile 1853
	else if(!isset($mybb->input['sid']) && $mybb->get_input('logoutkey') != $mybb->user['logoutkey'])
{
error($lang->error_notloggedout);

	else if(!isset($mybb->input['sid']) && $mybb->get_input('logoutkey') != $mybb->user['logoutkey'])
{
error($lang->error_notloggedout);

	}

	}


my_unsetcookie("mybbuser");
my_unsetcookie("sid");


my_unsetcookie("mybbuser");
my_unsetcookie("sid");

Zeile 1857Zeile 1873

if($mybb->input['action'] == "viewnotes")
{


if($mybb->input['action'] == "viewnotes")
{

	$uid = $mybb->get_input('uid', 1);

	$uid = $mybb->get_input('uid', MyBB::INPUT_INT);

	$user = get_user($uid);

// Make sure we are looking at a real user here.

	$user = get_user($uid);

// Make sure we are looking at a real user here.

Zeile 1874Zeile 1890
	$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);

$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));

	$lang->view_notes_for = $lang->sprintf($lang->view_notes_for, $user['username']);

$user['usernotes'] = nl2br(htmlspecialchars_uni($user['usernotes']));

 

$plugins->run_hooks('member_viewnotes');


eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";");
echo $viewnotes;


eval("\$viewnotes = \"".$templates->get("member_viewnotes", 1, 0)."\";");
echo $viewnotes;

Zeile 1883Zeile 1901
if($mybb->input['action'] == "profile")
{
$plugins->run_hooks("member_profile_start");

if($mybb->input['action'] == "profile")
{
$plugins->run_hooks("member_profile_start");





	if($mybb->usergroup['canviewprofiles'] == 0)

	if($mybb->usergroup['canviewprofiles'] == 0)

	{

	{

		error_no_permission();

		error_no_permission();

	}

$uid = $mybb->get_input('uid', 1);

	}

$uid = $mybb->get_input('uid', MyBB::INPUT_INT);

	if($uid)
{
$memprofile = get_user($uid);

	if($uid)
{
$memprofile = get_user($uid);

Zeile 1897Zeile 1915
	elseif($mybb->user['uid'])
{
$memprofile = $mybb->user;

	elseif($mybb->user['uid'])
{
$memprofile = $mybb->user;

	}

	}

	else
{
$memprofile = false;

	else
{
$memprofile = false;

Zeile 1906Zeile 1924
	if(!$memprofile)
{
error($lang->error_nomember);

	if(!$memprofile)
{
error($lang->error_nomember);

	}


	}


	$uid = $memprofile['uid'];

$lang->profile = $lang->sprintf($lang->profile, $memprofile['username']);

	$uid = $memprofile['uid'];

$lang->profile = $lang->sprintf($lang->profile, $memprofile['username']);

Zeile 1939Zeile 1957

$website = $sendemail = $sendpm = $contact_details = '';



$website = $sendemail = $sendpm = $contact_details = '';


	if($memprofile['website'] && $mybb->settings['hidewebsite'] != -1 && !is_member($mybb->settings['hidewebsite']) && $memperms['canchangewebsite'] == 1)

	if($memprofile['website'] && !is_member($mybb->settings['hidewebsite']) && $memperms['canchangewebsite'] == 1)

	{
$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
$bgcolor = alt_trow();

	{
$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
$bgcolor = alt_trow();

Zeile 1953Zeile 1971
	}

if($mybb->settings['enablepms'] == 1 && $memprofile['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false)

	}

if($mybb->settings['enablepms'] == 1 && $memprofile['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false)

	{

	{

		$bgcolor = alt_trow();	
eval('$sendpm = "'.$templates->get("member_profile_pm").'";');
}

$contact_fields = array();

		$bgcolor = alt_trow();	
eval('$sendpm = "'.$templates->get("member_profile_pm").'";');
}

$contact_fields = array();

 
	$any_contact_field = false;

	foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $field)
{
$contact_fields[$field] = '';

	foreach(array('icq', 'aim', 'yahoo', 'skype', 'google') as $field)
{
$contact_fields[$field] = '';



 
		$settingkey = 'allow'.$field.'field';


		$settingkey = 'allow'.$field.'field';


		if(!empty($memprofile[$field]) && ($mybb->settings[$settingkey] == -1 || $mybb->settings[$settingkey] != '' && is_member($mybb->settings[$settingkey], array('usergroup' => $memprofile['usergroup'], 'additionalgroups' => $memprofile['additionalgroups']))))

		if(!empty($memprofile[$field]) && is_member($mybb->settings[$settingkey], array('usergroup' => $memprofile['usergroup'], 'additionalgroups' => $memprofile['additionalgroups'])))

		{

		{

 
			$any_contact_field = true;


			if($field == 'icq')

			if($field == 'icq')

			{

			{

				$memprofile[$field] = (int)$memprofile[$field];
}
else

				$memprofile[$field] = (int)$memprofile[$field];
}
else

Zeile 1976Zeile 1996
				$memprofile[$field] = htmlspecialchars_uni($memprofile[$field]);
}
$tmpl = 'member_profile_contact_fields_'.$field;

				$memprofile[$field] = htmlspecialchars_uni($memprofile[$field]);
}
$tmpl = 'member_profile_contact_fields_'.$field;





			$bgcolors[$field] = alt_trow();
eval('$contact_fields[\''.$field.'\'] = "'.$templates->get($tmpl).'";');

			$bgcolors[$field] = alt_trow();
eval('$contact_fields[\''.$field.'\'] = "'.$templates->get($tmpl).'";');

		}
else
{
$memprofile[$field] = '';

 
		}
}


		}
}


	if(!empty($contact_fields) || $sendemail || $sendpm || $website)

	if($any_contact_field || $sendemail || $sendpm || $website)

	{
eval('$contact_details = "'.$templates->get("member_profile_contact_details").'";');
}

$signature = '';

	{
eval('$contact_details = "'.$templates->get("member_profile_contact_details").'";');
}

$signature = '';

	if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW) && $mybb->settings['hidesignatures'] != -1 && !is_member($mybb->settings['hidesignatures']) && $memperms['canusesig'] && $memperms['canusesigxposts'] <= $memprofile['postnum'])

	if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW) && !is_member($mybb->settings['hidesignatures']) && $memperms['canusesig'] && $memperms['canusesigxposts'] <= $memprofile['postnum'])

	{
$sig_parser = array(
"allow_html" => $mybb->settings['sightml'],

	{
$sig_parser = array(
"allow_html" => $mybb->settings['sightml'],

Zeile 2441Zeile 2457
	{
foreach($pfcache as $customfield)
{

	{
foreach($pfcache as $customfield)
{

			if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canmodcp'] != 1 && ($customfield['viewableby'] == '' || ($customfield['viewableby'] != -1 && !is_member($customfield['viewableby']))))

			if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['canmodcp'] != 1 && !is_member($customfield['viewableby']))

			{
continue;
}

			{
continue;
}

Zeile 2521Zeile 2537
	$lang->tpd_percent_total = $lang->sprintf($lang->tpd_percent_total, my_number_format($tpd), $thread_percent);

$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);

	$lang->tpd_percent_total = $lang->sprintf($lang->tpd_percent_total, my_number_format($tpd), $thread_percent);

$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);

 

$bannedbit = '';
if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1)
{
// Fetch details on their ban
$query = $db->simple_select('banned b LEFT JOIN '.TABLE_PREFIX.'users a ON (b.admin=a.uid)', 'b.*, a.username AS adminuser', "b.uid='{$uid}'", array('limit' => 1));
$memban = $db->fetch_array($query);

if($memban['reason'])
{
$memban['reason'] = htmlspecialchars_uni($parser->parse_badwords($memban['reason']));
}
else
{
$memban['reason'] = $lang->na;
}

if($memban['lifted'] == 'perm' || $memban['lifted'] == '' || $memban['bantime'] == 'perm' || $memban['bantime'] == '---')
{
$banlength = $lang->permanent;
$timeremaining = $lang->na;
}
else
{
// Set up the array of ban times.
$bantimes = fetch_ban_times();

$banlength = $bantimes[$memban['bantime']];
$remaining = $memban['lifted']-TIME_NOW;

$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";

if($remaining < 3600)
{
$timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 86400)
{
$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 604800)
{
$timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else
{
$timeremaining = "({$timeremaining} {$lang->ban_remaining})";
}
}

$memban['adminuser'] = build_profile_link($memban['adminuser'], $memban['admin']);

// Display a nice warning to the user
eval('$bannedbit = "'.$templates->get('member_profile_banned').'";');
}


$adminoptions = '';
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)


$adminoptions = '';
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)

Zeile 2553Zeile 2624
			eval("\$editnotes = \"".$templates->get("member_profile_modoptions_editnotes")."\";");
}


			eval("\$editnotes = \"".$templates->get("member_profile_modoptions_editnotes")."\";");
}


		if($mybb->usergroup['canbanusers'] == 1)

		if($mybb->usergroup['canbanusers'] == 1 && (!$memban['uid'] || $memban['uid'] && ($mybb->user['uid'] == $memban['admin']) || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1))

		{
eval("\$banuser = \"".$templates->get("member_profile_modoptions_banuser")."\";");
}

		{
eval("\$banuser = \"".$templates->get("member_profile_modoptions_banuser")."\";");
}

Zeile 2697Zeile 2768
		}
}


		}
}


	$query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".$mybb->get_input('uid', 1)."'");

	$query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");

	$to_user = $db->fetch_array($query);

if(!$to_user['username'])

	$to_user = $db->fetch_array($query);

if(!$to_user['username'])

Zeile 2864Zeile 2935
		}
}


		}
}


	$query = $db->simple_select("users", "uid, username, email, hideemail, ignorelist", "uid='".$mybb->get_input('uid', 1)."'");

	$query = $db->simple_select("users", "uid, username, email, hideemail, ignorelist", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");

	$to_user = $db->fetch_array($query);

$lang->email_user = $lang->sprintf($lang->email_user, $to_user['username']);

	$to_user = $db->fetch_array($query);

$lang->email_user = $lang->sprintf($lang->email_user, $to_user['username']);