Vergleich member.php - 1.6.9 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 14Zeile 14
define("ALLOWABLE_PAGE", "register,do_register,login,do_login,logout,lostpw,do_lostpw,activate,resendactivation,do_resendactivation,resetpassword");

$nosession['avatar'] = 1;

define("ALLOWABLE_PAGE", "register,do_register,login,do_login,logout,lostpw,do_lostpw,activate,resendactivation,do_resendactivation,resetpassword");

$nosession['avatar'] = 1;

$templatelist = "member_register,error_nousername,error_nopassword,error_passwordmismatch,error_invalidemail,error_usernametaken,error_emailmismatch,error_noemail,redirect_registered,member_register_hiddencaptcha";
$templatelist .= ",redirect_loggedout,login,redirect_loggedin,error_invalidusername,error_invalidpassword,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_profile_modoptions,member_profile_signature,member_profile_groupimage,member_profile_referrals";


$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,member_register_password,member_activate,member_resendactivation,member_lostpw";
$templatelist .= ",member_resetpassword,member_loggedin_notice,member_profile_away,member_emailuser,member_register_regimage,member_register_regimage_recaptcha,post_captcha_hidden,post_captcha,post_captcha_recaptcha";
$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_profile_modoptions,member_profile_signature,member_profile_groupimage,member_profile_referrals";

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 126Zeile 127
		"regip" => $session->ipaddress,
"longregip" => my_ip2long($session->ipaddress),
"coppa_user" => intval($mybb->cookies['coppauser']),

		"regip" => $session->ipaddress,
"longregip" => my_ip2long($session->ipaddress),
"coppa_user" => intval($mybb->cookies['coppauser']),

 
		"regcheck1" => $mybb->input['regcheck1'],
"regcheck2" => $mybb->input['regcheck2']

	);

	);

	
if(isset($mybb->input['regcheck1']) && isset($mybb->input['regcheck2']))
{
$user['regcheck1'] = $mybb->input['regcheck1'];
$user['regcheck2'] = $mybb->input['regcheck2'];
}

 

// Do we have a saved COPPA DOB?
if($mybb->cookies['coppadob'])


// Do we have a saved COPPA DOB?
if($mybb->cookies['coppadob'])

Zeile 161Zeile 158
	$errors = "";

if(!$userhandler->validate_user())

	$errors = "";

if(!$userhandler->validate_user())

	{

	{

		$errors = $userhandler->get_friendly_errors();

		$errors = $userhandler->get_friendly_errors();

	}


	}


	if($mybb->settings['captchaimage'])
{
require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha;

if($captcha->validate_captcha() == false)

	if($mybb->settings['captchaimage'])
{
require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha;

if($captcha->validate_captcha() == false)

		{

		{

			// CAPTCHA validation failed
foreach($captcha->get_errors() as $error)
{

			// CAPTCHA validation failed
foreach($captcha->get_errors() as $error)
{

Zeile 179Zeile 176
			}
}
}

			}
}
}





	if(is_array($errors))
{
$username = htmlspecialchars_uni($mybb->input['username']);

	if(is_array($errors))
{
$username = htmlspecialchars_uni($mybb->input['username']);

Zeile 190Zeile 187
		if($mybb->input['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

		if($mybb->input['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

		}

		}


if($mybb->input['hideemail'] == 1)


if($mybb->input['hideemail'] == 1)

		{

		{

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

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

		}


		}


		if($mybb->input['subscriptionmethod'] == 1)
{
$no_email_subscribe_selected = "selected=\"selected\"";

		if($mybb->input['subscriptionmethod'] == 1)
{
$no_email_subscribe_selected = "selected=\"selected\"";

		}

		}

		else if($mybb->input['subscriptionmethod'] == 2)
{
$instant_email_subscribe_selected = "selected=\"selected\"";

		else if($mybb->input['subscriptionmethod'] == 2)
{
$instant_email_subscribe_selected = "selected=\"selected\"";

Zeile 213Zeile 210
		if($mybb->input['receivepms'] == 1)
{
$receivepmscheck = "checked=\"checked\"";

		if($mybb->input['receivepms'] == 1)
{
$receivepmscheck = "checked=\"checked\"";

		}


		}


		if($mybb->input['pmnotice'] == 1)
{
$pmnoticecheck = " checked=\"checked\"";

		if($mybb->input['pmnotice'] == 1)
{
$pmnoticecheck = " checked=\"checked\"";

		}


		}


		if($mybb->input['emailpmnotify'] == 1)
{
$emailpmnotifycheck = "checked=\"checked\"";

		if($mybb->input['emailpmnotify'] == 1)
{
$emailpmnotifycheck = "checked=\"checked\"";

		}

		}


if($mybb->input['invisible'] == 1)
{


if($mybb->input['invisible'] == 1)
{

Zeile 248Zeile 245
		$fromreg = 1;
}
else

		$fromreg = 1;
}
else

	{

	{

		$user_info = $userhandler->insert_user();

if($mybb->settings['regtype'] != "randompass" && !$mybb->cookies['coppauser'])
{
// Log them in
my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true);

		$user_info = $userhandler->insert_user();

if($mybb->settings['regtype'] != "randompass" && !$mybb->cookies['coppauser'])
{
// Log them in
my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true);

		}

		}


if($mybb->cookies['coppauser'])


if($mybb->cookies['coppauser'])

		{

		{

			$lang->redirect_registered_coppa_activate = $lang->sprintf($lang->redirect_registered_coppa_activate, $mybb->settings['bbname'], $user_info['username']);
my_unsetcookie("coppauser");
my_unsetcookie("coppadob");

			$lang->redirect_registered_coppa_activate = $lang->sprintf($lang->redirect_registered_coppa_activate, $mybb->settings['bbname'], $user_info['username']);
my_unsetcookie("coppauser");
my_unsetcookie("coppadob");

Zeile 277Zeile 274
			);
$db->insert_query("awaitingactivation", $activationarray);
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

			);
$db->insert_query("awaitingactivation", $activationarray);
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

			switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

			switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

					break;
case 1:
$emailmessage = $lang->sprintf($lang->email_activateaccount1, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

					break;
case 1:
$emailmessage = $lang->sprintf($lang->email_activateaccount1, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

					break;

					break;

				case 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

				case 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);

					break;

					break;

				default:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;

				default:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;

Zeile 295Zeile 292
			my_mail($user_info['email'], $emailsubject, $emailmessage);

$lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);

			my_mail($user_info['email'], $emailsubject, $emailmessage);

$lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);





			$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_activation);

			$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_activation);

Zeile 306Zeile 303
			switch($mybb->settings['username_method'])
{
case 0:

			switch($mybb->settings['username_method'])
{
case 0:

					$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);

					$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);

					break;
case 1:
$emailmessage = $lang->sprintf($lang->email_randompassword1, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_randompassword2, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);

					break;
case 1:
$emailmessage = $lang->sprintf($lang->email_randompassword1, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_randompassword2, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);

					break;

					break;

				default:
$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
}
my_mail($user_info['email'], $emailsubject, $emailmessage);


				default:
$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
}
my_mail($user_info['email'], $emailsubject, $emailmessage);


			$plugins->run_hooks("member_do_register_end");


			$plugins->run_hooks("member_do_register_end");


			error($lang->redirect_registered_passwordsent);
}
else if($mybb->settings['regtype'] == "admin")
{
$lang->redirect_registered_admin_activate = $lang->sprintf($lang->redirect_registered_admin_activate, $mybb->settings['bbname'], $user_info['username']);

			error($lang->redirect_registered_passwordsent);
}
else if($mybb->settings['regtype'] == "admin")
{
$lang->redirect_registered_admin_activate = $lang->sprintf($lang->redirect_registered_admin_activate, $mybb->settings['bbname'], $user_info['username']);





			$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_admin_activate);

			$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_admin_activate);

Zeile 335Zeile 332
		else
{
$lang->redirect_registered = $lang->sprintf($lang->redirect_registered, $mybb->settings['bbname'], $user_info['username']);

		else
{
$lang->redirect_registered = $lang->sprintf($lang->redirect_registered, $mybb->settings['bbname'], $user_info['username']);





			$plugins->run_hooks("member_do_register_end");

redirect("index.php", $lang->redirect_registered);
}

			$plugins->run_hooks("member_do_register_end");

redirect("index.php", $lang->redirect_registered);
}

	}
}


	}
}


if($mybb->input['action'] == "coppa_form")
{
if(!$mybb->settings['faxno'])

if($mybb->input['action'] == "coppa_form")
{
if(!$mybb->settings['faxno'])

	{

	{

		$mybb->settings['faxno'] = " ";
}


		$mybb->settings['faxno'] = " ";
}


Zeile 364Zeile 361
	for($i = 1; $i <= 31; ++$i)
{
if($mybb->input['bday1'] == $i)

	for($i = 1; $i <= 31; ++$i)
{
if($mybb->input['bday1'] == $i)

		{

		{

			$bdaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else

			$bdaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
}
else

Zeile 423Zeile 420
			}
$lang->coppa_agreement_1 = $lang->sprintf($lang->coppa_agreement_1, $mybb->settings['bbname']);
eval("\$coppa_agreement = \"".$templates->get("member_register_agreement_coppa")."\";");

			}
$lang->coppa_agreement_1 = $lang->sprintf($lang->coppa_agreement_1, $mybb->settings['bbname']);
eval("\$coppa_agreement = \"".$templates->get("member_register_agreement_coppa")."\";");

		}

		}


$plugins->run_hooks("member_register_agreement");



$plugins->run_hooks("member_register_agreement");


Zeile 481Zeile 478
			if($mybb->cookies['mybb']['referrer'])
{
$query = $db->simple_select("users", "uid,username", "uid='".$db->escape_string($mybb->cookies['mybb']['referrer'])."'");

			if($mybb->cookies['mybb']['referrer'])
{
$query = $db->simple_select("users", "uid,username", "uid='".$db->escape_string($mybb->cookies['mybb']['referrer'])."'");

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

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

				$referrername = $ref['username'];
}
elseif($referrer)

				$referrername = $ref['username'];
}
elseif($referrer)

			{

			{

				$query = $db->simple_select("users", "username", "uid='".intval($referrer['uid'])."'");
$ref = $db->fetch_array($query);
$referrername = $ref['username'];

				$query = $db->simple_select("users", "username", "uid='".intval($referrer['uid'])."'");
$ref = $db->fetch_array($query);
$referrername = $ref['username'];

			}

			}

			elseif($referrername)
{
$query = $db->simple_select("users", "uid", "LOWER(username)='".$db->escape_string(my_strtolower($referrername))."'");

			elseif($referrername)
{
$query = $db->simple_select("users", "uid", "LOWER(username)='".$db->escape_string(my_strtolower($referrername))."'");

Zeile 500Zeile 497
				}
}
if($quickreg)

				}
}
if($quickreg)

			{

			{

				$refbg = "trow1";
}
else

				$refbg = "trow1";
}
else

Zeile 511Zeile 508
			$validator_extra .= "\tregValidator.register('referrer', 'ajax', {url:'xmlhttp.php?action=username_exists', loading_message:'{$lang->js_validator_checking_referrer}'});\n";

eval("\$referrer = \"".$templates->get("member_register_referrer")."\";");

			$validator_extra .= "\tregValidator.register('referrer', 'ajax', {url:'xmlhttp.php?action=username_exists', loading_message:'{$lang->js_validator_checking_referrer}'});\n";

eval("\$referrer = \"".$templates->get("member_register_referrer")."\";");

		}

		}

		else
{
$referrer = '';

		else
{
$referrer = '';

Zeile 530Zeile 527
			if($errors)
{
$userfield = $mybb->input['profile_fields'][$field];

			if($errors)
{
$userfield = $mybb->input['profile_fields'][$field];

			}

			}

			else
{
$userfield = '';

			else
{
$userfield = '';

Zeile 540Zeile 537
				if($errors)
{
$useropts = $userfield;

				if($errors)
{
$useropts = $userfield;

				}

				}

				else
{
$useropts = explode("\n", $userfield);

				else
{
$useropts = explode("\n", $userfield);

Zeile 598Zeile 595
				}
}
elseif($type == "radio")

				}
}
elseif($type == "radio")

			{

			{

				$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

				$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

Zeile 1066Zeile 1063
		$username = $user['username'];

// Generate a new password, then update it

		$username = $user['username'];

// Generate a new password, then update it

		$password_length = intval($mybb->settings['minpasswordlength']);

		$password_length = intval($mybb->settings['minpasswordlength']);


if($password_length < 8)


if($password_length < 8)

		{

		{

			$password_length = 8;
}

			$password_length = 8;
}





		$password = random_str($password_length);
$logindetails = update_password($user['uid'], md5($password), $user['salt']);

		$password = random_str($password_length);
$logindetails = update_password($user['uid'], md5($password), $user['salt']);





		$email = $user['email'];

$plugins->run_hooks("member_resetpassword_process");

		$email = $user['email'];

$plugins->run_hooks("member_resetpassword_process");

Zeile 1091Zeile 1088
	else
{
$plugins->run_hooks("member_resetpassword_form");

	else
{
$plugins->run_hooks("member_resetpassword_form");

		
switch($mybb->settings['username_method'])
{
case 0:
$lang_username = $lang->username;

		
switch($mybb->settings['username_method'])
{
case 0:
$lang_username = $lang->username;

				break;
case 1:
$lang_username = $lang->username1;

				break;
case 1:
$lang_username = $lang->username1;

				break;

				break;

			case 2:
$lang_username = $lang->username2;
break;

			case 2:
$lang_username = $lang->username2;
break;

Zeile 1113Zeile 1110
	}
}


	}
}


$do_captcha = $correct = false;
$inline_errors = "";

$correct = false;
$inline_errors = '';

if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")
{
$plugins->run_hooks("member_do_login_start");

if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")
{
$plugins->run_hooks("member_do_login_start");

	



	// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
$logins = login_attempt_check();
$login_text = '';

	// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
$logins = login_attempt_check();
$login_text = '';

	



	// Did we come from the quick login form
if($mybb->input['quick_login'] == "1" && $mybb->input['quick_password'] && $mybb->input['quick_username'])

	// Did we come from the quick login form
if($mybb->input['quick_login'] == "1" && $mybb->input['quick_password'] && $mybb->input['quick_username'])

	{

	{

		$mybb->input['password'] = $mybb->input['quick_password'];
$mybb->input['username'] = $mybb->input['quick_username'];
$mybb->input['remember'] = $mybb->input['quick_remember'];

		$mybb->input['password'] = $mybb->input['quick_password'];
$mybb->input['username'] = $mybb->input['quick_username'];
$mybb->input['remember'] = $mybb->input['quick_remember'];

Zeile 1156Zeile 1153
	$loginattempts = $db->fetch_field($query, "loginattempts");

$errors = array();

	$loginattempts = $db->fetch_field($query, "loginattempts");

$errors = array();

 


	if($mybb->settings['failedcaptchalogincount'] > 0 && ($loginattempts > $mybb->settings['failedcaptchalogincount'] || intval($mybb->cookies['loginattempts']) > $mybb->settings['failedcaptchalogincount']))
{
// Show captcha image if enabled
if($mybb->settings['captchaimage'])
{
$do_captcha = false;

	if($mybb->settings['failedcaptchalogincount'] > 0 && ($loginattempts > $mybb->settings['failedcaptchalogincount'] || intval($mybb->cookies['loginattempts']) > $mybb->settings['failedcaptchalogincount']))
{
// Show captcha image if enabled
if($mybb->settings['captchaimage'])
{
$do_captcha = false;





			// Check their current captcha input - if correct, hide the captcha input area
require_once MYBB_ROOT.'inc/class_captcha.php';
$login_captcha = new captcha;

			// Check their current captcha input - if correct, hide the captcha input area
require_once MYBB_ROOT.'inc/class_captcha.php';
$login_captcha = new captcha;





			if($login_captcha->validate_captcha() == false)
{
$correct = true;
$do_captcha = true;

			if($login_captcha->validate_captcha() == false)
{
$correct = true;
$do_captcha = true;



				

				// CAPTCHA validation failed
foreach($login_captcha->get_errors() as $error)
{

				// CAPTCHA validation failed
foreach($login_captcha->get_errors() as $error)
{

Zeile 1183Zeile 1181

// Don't check password when captcha isn't solved
if(empty($errors))


// Don't check password when captcha isn't solved
if(empty($errors))

	{

	{

		$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])
{

		$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])
{

Zeile 1201Zeile 1199
			switch($mybb->settings['username_method'])
{
case 0:

			switch($mybb->settings['username_method'])
{
case 0:

					$errors[] = $lang->error_invalidpworusername.$login_text;

					$errors[] = $lang->error_invalidpworusername.$login_text;

					break;
case 1:
$errors[] = $lang->error_invalidpworusername1.$login_text;
break;
case 2:
$errors[] = $lang->error_invalidpworusername2.$login_text;

					break;
case 1:
$errors[] = $lang->error_invalidpworusername1.$login_text;
break;
case 2:
$errors[] = $lang->error_invalidpworusername2.$login_text;

					break;

					break;

				default:
$errors[] = $lang->error_invalidpworusername.$login_text;
break;

				default:
$errors[] = $lang->error_invalidpworusername.$login_text;
break;

			}
}

			}
}

		else
{
$correct = true;

		else
{
$correct = true;

		}

		}

	}

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

	}

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

		

		

		$inline_errors = inline_error($errors);
}
else if($correct)

		$inline_errors = inline_error($errors);
}
else if($correct)

Zeile 1242Zeile 1240
		$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

$db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");

		$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

$db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");

		

		

		if($mybb->input['remember'] != "yes")

		if($mybb->input['remember'] != "yes")

		{

		{

			$remember = -1;

			$remember = -1;

		}

		}

		else
{
$remember = null;
}
my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true);
my_setcookie("sid", $session->sid, -1, true);

		else
{
$remember = null;
}
my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true);
my_setcookie("sid", $session->sid, -1, true);

		



		$plugins->run_hooks("member_do_login_end");

		$plugins->run_hooks("member_do_login_end");

		



		if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)
{
if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false)

		if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)
{
if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false)

Zeile 1278Zeile 1276
		$mybb->input['action'] = "login";
$mybb->input['request_method'] = "get";
}

		$mybb->input['action'] = "login";
$mybb->input['request_method'] = "get";
}

	



	$plugins->run_hooks("member_do_login_end");
}

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

	$plugins->run_hooks("member_do_login_end");
}

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

	



	$member_loggedin_notice = "";
if($mybb->user['uid'] != 0)
{
$lang->already_logged_in = $lang->sprintf($lang->already_logged_in, build_profile_link($mybb->user['username'], $mybb->user['uid']));
eval("\$member_loggedin_notice = \"".$templates->get("member_loggedin_notice")."\";");

	$member_loggedin_notice = "";
if($mybb->user['uid'] != 0)
{
$lang->already_logged_in = $lang->sprintf($lang->already_logged_in, build_profile_link($mybb->user['username'], $mybb->user['uid']));
eval("\$member_loggedin_notice = \"".$templates->get("member_loggedin_notice")."\";");

	}


	}


	// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
login_attempt_check();

// Redirect to the page where the user came from, but not if that was the login page.

	// Checks to make sure the user can login; they haven't had too many tries at logging in.
// Is a fatal call if user has had too many tries
login_attempt_check();

// Redirect to the page where the user came from, but not if that was the login page.

 
	$redirect_url = '';

	if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)
{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);

	if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)
{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);

	}
else
{
$redirect_url = '';

 
	}


	}


	$captcha = "";
// Show captcha image for guests if enabled
if($mybb->settings['captchaimage'])

	$captcha = '';
// Show captcha image for guests if enabled and only if we have to do
if($mybb->settings['captchaimage'] && isset($do_captcha))

	{

	{

 
		$correct = false;

		require_once MYBB_ROOT.'inc/class_captcha.php';

		require_once MYBB_ROOT.'inc/class_captcha.php';


if($do_captcha == true)



























		$login_captcha = new captcha(false, "post_captcha");

if($do_captcha == false && $login_captcha->type == 1)
{
if($login_captcha->validate_captcha() == true)
{
$correct = true;
$captcha = $login_captcha->build_hidden_captcha();
}
}

if(!$correct)
{
if($login_captcha->type == 1)
{
$login_captcha->build_captcha();
}
elseif($login_captcha->type == 2)
{
$login_captcha->build_recaptcha();
}

if($login_captcha->html)
{
$captcha = $login_captcha->html;
}
}
elseif($correct && $login_captcha->type == 2)

		{

		{

			$login_captcha = new captcha(true, "post_captcha");

			$login_captcha->build_recaptcha();


if($login_captcha->html)
{
$captcha = $login_captcha->html;
}


if($login_captcha->html)
{
$captcha = $login_captcha->html;
}

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

 
		}
}


		}
}


	$username = '';
$password = '';

	$username = "";
$password = "";

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

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

Zeile 1367Zeile 1384

// Check session ID if we have one
if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)


// Check session ID if we have one
if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)

	{
error($lang->error_notloggedout);

	{
error($lang->error_notloggedout);

	}
// Otherwise, check logoutkey
else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey'])

	}
// Otherwise, check logoutkey
else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey'])

Zeile 1477Zeile 1494
	if($mybb->settings['enablepms'] != 0 && (($memprofile['receivepms'] != 0 && $memperms['canusepms'] != 0 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))
{
$lang->send_pm = $lang->sprintf($lang->send_pm, $memprofile['username']);

	if($mybb->settings['enablepms'] != 0 && (($memprofile['receivepms'] != 0 && $memperms['canusepms'] != 0 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))
{
$lang->send_pm = $lang->sprintf($lang->send_pm, $memprofile['username']);

	}
else

	}
else

	{
$lang->send_pm = '';
}

	{
$lang->send_pm = '';
}

Zeile 1527Zeile 1544
		$bgcolors[$cat] = alt_trow();
}


		$bgcolors[$cat] = alt_trow();
}


 
	$website = '';

	if($memprofile['website'])
{
$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
$website = "<a href=\"{$memprofile['website']}\" target=\"_blank\">{$memprofile['website']}</a>";

	if($memprofile['website'])
{
$memprofile['website'] = htmlspecialchars_uni($memprofile['website']);
$website = "<a href=\"{$memprofile['website']}\" target=\"_blank\">{$memprofile['website']}</a>";

	}
else
{
$website = '';

 
	}


	}


 
	$signature = '';

	if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW))
{
$sig_parser = array(

	if($memprofile['signature'] && ($memprofile['suspendsignature'] == 0 || $memprofile['suspendsigtime'] < TIME_NOW))
{
$sig_parser = array(

Zeile 1591Zeile 1606
		$memprofile['icq'] = '';
}


		$memprofile['icq'] = '';
}


 
	$awaybit = '';

	if($memprofile['away'] == 1 && $mybb->settings['allowaway'] != 0)
{
$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);

	if($memprofile['away'] == 1 && $mybb->settings['allowaway'] != 0)
{
$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);

Zeile 1741Zeile 1757
	// Get the user title for this user
unset($usertitle);
unset($stars);

	// Get the user title for this user
unset($usertitle);
unset($stars);

 
	$starimage = '';

	if(trim($memprofile['usertitle']) != '')
{
// User has custom user title

	if(trim($memprofile['usertitle']) != '')
{
// User has custom user title

Zeile 1780Zeile 1797
	elseif(!$stars)
{
if(!is_array($usertitles))

	elseif(!$stars)
{
if(!is_array($usertitles))

		{

		{

			$usertitles = $cache->read('usertitles');
}


			$usertitles = $cache->read('usertitles');
}


Zeile 1799Zeile 1816
		}
}


		}
}


 
	$groupimage = '';

	if(!empty($displaygroup['image']))
{
if(!empty($mybb->user['language']))
{
$language = $mybb->user['language'];

	if(!empty($displaygroup['image']))
{
if(!empty($mybb->user['language']))
{
$language = $mybb->user['language'];

		}

		}

		else
{
$language = $mybb->settings['bblanguage'];

		else
{
$language = $mybb->settings['bblanguage'];

		}

		}

		$displaygroup['image'] = str_replace("{lang}", $language, $displaygroup['image']);
$displaygroup['image'] = str_replace("{theme}", $theme['imgdir'], $displaygroup['image']);
eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";");
}


		$displaygroup['image'] = str_replace("{lang}", $language, $displaygroup['image']);
$displaygroup['image'] = str_replace("{theme}", $theme['imgdir'], $displaygroup['image']);
eval("\$groupimage = \"".$templates->get("member_profile_groupimage")."\";");
}


	if(!$starimage)

	if(empty($starimage))

	{
$starimage = $displaygroup['starimage'];
}


	{
$starimage = $displaygroup['starimage'];
}


	if($starimage)

	if(!empty($starimage))

	{
// Only display stars if we have an image to use...
$starimage = str_replace("{theme}", $theme['imgdir'], $starimage);

	{
// Only display stars if we have an image to use...
$starimage = str_replace("{theme}", $theme['imgdir'], $starimage);

Zeile 1868Zeile 1886

// Fetch the reputation for this user
if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))


// Fetch the reputation for this user
if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1 && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))

	{

	{

		$bg_color = alt_trow();
$reputation = get_reputation($memprofile['reputation']);

		$bg_color = alt_trow();
$reputation = get_reputation($memprofile['reputation']);





		// If this user has permission to give reputations show the vote link

		// If this user has permission to give reputations show the vote link

 
		$vote_link = '';

		if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'])

		if($mybb->usergroup['cangivereputations'] == 1 && $memprofile['uid'] != $mybb->user['uid'])

		{

		{

			$vote_link = "[<a href=\"javascript:MyBB.reputation({$memprofile['uid']});\">{$lang->reputation_vote}</a>]";

			$vote_link = "[<a href=\"javascript:MyBB.reputation({$memprofile['uid']});\">{$lang->reputation_vote}</a>]";

		}


		}


		eval("\$reputation = \"".$templates->get("member_profile_reputation")."\";");
}


		eval("\$reputation = \"".$templates->get("member_profile_reputation")."\";");
}


Zeile 1894Zeile 1913
		{
eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");
$warning_link = "warnings.php?uid={$memprofile['uid']}";

		{
eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");
$warning_link = "warnings.php?uid={$memprofile['uid']}";

		}
else
{
$warning_link = "usercp.php";
}


		}
else
{
$warn_user = '';
$warning_link = 'usercp.php';
}

		eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";");
}


		eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";");
}


Zeile 1909Zeile 1929
	$alttrow = "trow1";
// If this user is an Administrator or a Moderator then we wish to show all profile fields
if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['canmodcp'] == 1)

	$alttrow = "trow1";
// If this user is an Administrator or a Moderator then we wish to show all profile fields
if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['canmodcp'] == 1)

	{

	{

		$field_hidden = '1=1';
}
else

		$field_hidden = '1=1';
}
else

	{

	{

		$field_hidden = "hidden=0";
}
$query = $db->simple_select("profilefields", "*", "{$field_hidden}", array('order_by' => 'disporder'));

		$field_hidden = "hidden=0";
}
$query = $db->simple_select("profilefields", "*", "{$field_hidden}", array('order_by' => 'disporder'));

Zeile 1922Zeile 1942
		$thing = explode("\n", $customfield['type'], "2");
$type = trim($thing[0]);


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


 
		$customfieldval = '';

		$field = "fid{$customfield['fid']}";

		$field = "fid{$customfield['fid']}";

		$useropts = explode("\n", $userfields[$field]);
$customfieldval = $comma = '';
if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox"))


if(isset($userfields[$field]))


		{

		{

			foreach($useropts as $val)



			$useropts = explode("\n", $userfields[$field]);
$customfieldval = $comma = '';
if(is_array($useropts) && ($type == "multiselect" || $type == "checkbox"))

			{

			{

				if($val != '')

				foreach($useropts as $val)

				{

				{

					$customfieldval .= "<li style=\"margin-left: 0;\">{$val}</li>";








					if($val != '')
{
$customfieldval .= "<li style=\"margin-left: 0;\">{$val}</li>";
}
}
if($customfieldval != '')
{
$customfieldval = "<ul style=\"margin: 0; padding-left: 15px;\">{$customfieldval}</ul>";

				}

				}

			}
if($customfieldval != '')
{
$customfieldval = "<ul style=\"margin: 0; padding-left: 15px;\">{$customfieldval}</ul>";
}
}
else
{
$userfields[$field] = $parser->parse_badwords($userfields[$field]);

if($customfield['type'] == "textarea")
{
$customfieldval = nl2br(htmlspecialchars_uni($userfields[$field]));

 
			}
else
{

			}
else
{

				$customfieldval = htmlspecialchars_uni($userfields[$field]);










				$userfields[$field] = $parser->parse_badwords($userfields[$field]);

if($customfield['type'] == "textarea")
{
$customfieldval = nl2br(htmlspecialchars_uni($userfields[$field]));
}
else
{
$customfieldval = htmlspecialchars_uni($userfields[$field]);
}

			}
}


			}
}


Zeile 1958Zeile 1983
		$bgcolor = alt_trow();
}
if($customfields)

		$bgcolor = alt_trow();
}
if($customfields)

	{

	{

		eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");
}
$memprofile['postnum'] = my_number_format($memprofile['postnum']);
$lang->ppd_percent_total = $lang->sprintf($lang->ppd_percent_total, my_number_format($ppd), $percent);
$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);
if($memprofile['timeonline'] > 0)

		eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");
}
$memprofile['postnum'] = my_number_format($memprofile['postnum']);
$lang->ppd_percent_total = $lang->sprintf($lang->ppd_percent_total, my_number_format($ppd), $percent);
$formattedname = format_name($memprofile['username'], $memprofile['usergroup'], $memprofile['displaygroup']);
if($memprofile['timeonline'] > 0)

	{

	{

		$timeonline = nice_time($memprofile['timeonline']);

		$timeonline = nice_time($memprofile['timeonline']);

	}
else

	}
else

	{
$timeonline = $lang->none_registered;

	{
$timeonline = $lang->none_registered;

	}



	}

$adminoptions = '';

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

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

	{

	{

		eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");
}

		eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");
}

	else
{
$adminoptions = '';
}



$modoptions = '';




	if($mybb->usergroup['canmodcp'] == 1)
{
$memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));

	if($mybb->usergroup['canmodcp'] == 1)
{
$memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));

Zeile 2000Zeile 2023
		
eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";");
}

		
eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";");
}

	else
{
$modoptions = '';
}








	$buddy_options = '';

	$buddy_options = '';

	

 
	if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0)
{
$buddy_list = explode(',', $mybb->user['buddylist']);
if(in_array($mybb->input['uid'], $buddy_list))

	if($mybb->user['uid'] != $memprofile['uid'] && $mybb->user['uid'] != 0)
{
$buddy_list = explode(',', $mybb->user['buddylist']);
if(in_array($mybb->input['uid'], $buddy_list))

		{

		{

			$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>";
}

			$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>";
}

		else
{
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>";
}


		else
{
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>";
}


		$ignore_list = explode(',', $mybb->user['ignorelist']);
if(in_array($mybb->input['uid'], $ignore_list))

		$ignore_list = explode(',', $mybb->user['ignorelist']);
if(in_array($mybb->input['uid'], $ignore_list))

		{

		{

			$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" alt=\"{$lang->remove_from_ignore_list}\" /> {$lang->remove_from_ignore_list}</a>";
}
else

			$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" alt=\"{$lang->remove_from_ignore_list}\" /> {$lang->remove_from_ignore_list}</a>";
}
else

Zeile 2031Zeile 2049
	}

$plugins->run_hooks("member_profile_end");

	}

$plugins->run_hooks("member_profile_end");

	



	eval("\$profile = \"".$templates->get("member_profile")."\";");
output_page($profile);
}

	eval("\$profile = \"".$templates->get("member_profile")."\";");
output_page($profile);
}