Vergleich member.php - 1.8.24 - 1.8.32

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

$templatelist = "member_register,member_register_hiddencaptcha,member_register_coppa,member_register_agreement_coppa,member_register_agreement,member_register_customfield,member_register_requiredfields,member_profile_findthreads";
$templatelist .= ",member_loggedin_notice,member_profile_away,member_register_regimage,member_register_regimage_recaptcha_invisible,member_register_regimage_nocaptcha,post_captcha_hcaptcha_invisible,post_captcha_hcaptcha,post_captcha_hidden,post_captcha,member_register_referrer";


$templatelist = "member_register,member_register_hiddencaptcha,member_register_coppa,member_register_agreement_coppa,member_register_agreement,member_register_customfield,member_register_requiredfields,member_profile_findthreads";
$templatelist .= ",member_loggedin_notice,member_profile_away,member_register_regimage,member_register_regimage_recaptcha_invisible,member_register_regimage_nocaptcha,post_captcha_hcaptcha_invisible,post_captcha_hcaptcha,post_captcha_hidden,post_captcha,member_register_referrer";

$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_manageban,member_profile_adminoptions,member_profile";

$templatelist .= ",member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_warninglevel_link,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions_manageban,member_profile_adminoptions,member_profile";

$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_referrals_link,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_lostpw,member_register_additionalfields";
$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,member_viewnotes";

$templatelist .= ",member_profile_signature,member_profile_avatar,member_profile_groupimage,member_referrals_link,member_profile_referrals,member_profile_website,member_profile_reputation_vote,member_activate,member_lostpw,member_register_additionalfields";
$templatelist .= ",member_profile_modoptions_manageuser,member_profile_modoptions_editprofile,member_profile_modoptions_banuser,member_profile_modoptions_viewnotes,member_profile_modoptions_editnotes,member_profile_modoptions_purgespammer";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,member_viewnotes";

Zeile 31Zeile 31
require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_user.php";
require_once MYBB_ROOT."inc/class_parser.php";

require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_user.php";
require_once MYBB_ROOT."inc/class_parser.php";

 
require_once MYBB_ROOT."inc/functions_modcp.php";

$parser = new postParser;

// Load global language phrases

$parser = new postParser;

// Load global language phrases

Zeile 89Zeile 90
	}
}


	}
}


 
$fromreg = 0;

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

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

Zeile 300Zeile 302
				$db->update_query("questions", $update_question, "qid='{$question['qid']}'");
}


				$db->update_query("questions", $update_question, "qid='{$question['qid']}'");
}


			$db->delete_query("questionsessions", "sid='{$sid}'");

			$db->delete_query("questionsessions", "sid='{$question_id}'");

		}
}


		}
}


 
	$regerrors = '';

	if(!empty($errors))
{
$username = htmlspecialchars_uni($mybb->get_input('username'));

	if(!empty($errors))
{
$username = htmlspecialchars_uni($mybb->get_input('username'));

Zeile 597Zeile 600

// Verify if we have permissions to access user-users
require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php";


// Verify if we have permissions to access user-users
require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/user/module_meta.php";

						if(function_exists("user_admin_permissions"))
{

 
							// Get admin permissions
$adminperms = get_admin_permissions($recipient['uid']);

							// Get admin permissions
$adminperms = get_admin_permissions($recipient['uid']);


$permissions = user_admin_permissions();
if(array_key_exists('users', $permissions['permissions']) && $adminperms['user']['users'] != 1)

							if(empty($adminperms['user']['users']) || $adminperms['user']['users'] != 1)



							{
continue; // No permissions
}

							{
continue; // No permissions
}

						}

 
					}

// Load language

					}

// Load language

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

		else
{
$lang->redirect_registered = $lang->sprintf($lang->redirect_registered, $mybb->settings['bbname'], htmlspecialchars_uni($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);

Zeile 730Zeile 728

$months = get_bdays($birthday_year);
if($mybb->input['bday2'] < 1 || $mybb->input['bday2'] > 12 || $birthday_year < (date("Y")-100) || $birthday_year > date("Y") || $mybb->input['bday1'] > $months[$mybb->input['bday2']-1])


$months = get_bdays($birthday_year);
if($mybb->input['bday2'] < 1 || $mybb->input['bday2'] > 12 || $birthday_year < (date("Y")-100) || $birthday_year > date("Y") || $mybb->input['bday1'] > $months[$mybb->input['bday2']-1])

			{

			{

				error($lang->error_invalid_birthday);

				error($lang->error_invalid_birthday);

			}


			}


			$bdaytime = @mktime(0, 0, 0, $mybb->input['bday2'], $mybb->input['bday1'], $birthday_year);

// Store DOB in cookie so we can save it with the registration

			$bdaytime = @mktime(0, 0, 0, $mybb->input['bday2'], $mybb->input['bday1'], $birthday_year);

// Store DOB in cookie so we can save it with the registration

Zeile 753Zeile 751
			$plugins->run_hooks("member_register_coppa");

my_unsetcookie("coppauser");

			$plugins->run_hooks("member_register_coppa");

my_unsetcookie("coppauser");





			$coppa_desc = $mybb->settings['coppa'] == 'deny' ? $lang->coppa_desc_for_deny : $lang->coppa_desc;
eval("\$coppa = \"".$templates->get("member_register_coppa")."\";");
output_page($coppa);

			$coppa_desc = $mybb->settings['coppa'] == 'deny' ? $lang->coppa_desc_for_deny : $lang->coppa_desc;
eval("\$coppa = \"".$templates->get("member_register_coppa")."\";");
output_page($coppa);

Zeile 762Zeile 760
	}

if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) && $fromreg == 0 || $mybb->request_method != "post")

	}

if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) && $fromreg == 0 || $mybb->request_method != "post")

	{

	{

		$coppa_agreement = '';
// Is this user a COPPA user? We need to show the COPPA agreement too
if($mybb->settings['coppa'] != "disabled" && ($mybb->cookies['coppauser'] == 1 || $under_thirteen))

		$coppa_agreement = '';
// Is this user a COPPA user? We need to show the COPPA agreement too
if($mybb->settings['coppa'] != "disabled" && ($mybb->cookies['coppauser'] == 1 || $under_thirteen))

Zeile 841Zeile 839
				$ref['username'] = htmlspecialchars_uni($ref['username']);
$referrername = $ref['username'];
}

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

			elseif(isset($referrer))

			elseif(!empty($referrer))

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

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

Zeile 859Zeile 857
			else
{
$referrername = '';

			else
{
$referrername = '';

			}
if(isset($quickreg))
{

			}
if(isset($quickreg))
{

				$refbg = "trow1";
}
else

				$refbg = "trow1";
}
else

Zeile 903Zeile 901
				$code = $select = $val = $options = $expoptions = $useropts = '';
$seloptions = array();
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

				$code = $select = $val = $options = $expoptions = $useropts = '';
$seloptions = array();
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

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

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

				$type = trim($thing[0]);

				$type = trim($thing[0]);

				$options = $thing[1];

				$options = isset($thing[1]) ? $thing[1] : null;

				$select = '';
$field = "fid{$profilefield['fid']}";
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);

				$select = '';
$field = "fid{$profilefield['fid']}";
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);

				if($errors && isset($mybb->input['profile_fields'][$field]))

				if(!empty($errors) && isset($mybb->input['profile_fields'][$field]))

				{
$userfield = $mybb->input['profile_fields'][$field];
}

				{
$userfield = $mybb->input['profile_fields'][$field];
}

Zeile 920Zeile 918
				}
if($type == "multiselect")
{

				}
if($type == "multiselect")
{

					if($errors)

					if(!empty($errors))

					{
$useropts = $userfield;
}

					{
$useropts = $userfield;
}

Zeile 1003Zeile 1001
				}
elseif($type == "checkbox")
{

				}
elseif($type == "checkbox")
{

					if($errors)

					if(!empty($errors))

					{
$useropts = $userfield;
}

					{
$useropts = $userfield;
}

Zeile 1080Zeile 1078
			}
}


			}
}


		if(!isset($fromreg))

		if(!isset($fromreg) || $fromreg == 0)

		{
$allownoticescheck = "checked=\"checked\"";
$hideemailcheck = '';

		{
$allownoticescheck = "checked=\"checked\"";
$hideemailcheck = '';

Zeile 1099Zeile 1097
		}
// Spambot registration image thingy
$captcha_html = 0;

		}
// Spambot registration image thingy
$captcha_html = 0;

 
		$regimage = '';

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

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

Zeile 1203Zeile 1202
		$time = TIME_NOW;

$plugins->run_hooks("member_register_end");

		$time = TIME_NOW;

$plugins->run_hooks("member_register_end");

		



		$jsvar_reqfields = json_encode($jsvar_reqfields);

		$jsvar_reqfields = json_encode($jsvar_reqfields);





		$validator_javascript = "<script type=\"text/javascript\">
var regsettings = {
requiredfields: '{$jsvar_reqfields}',

		$validator_javascript = "<script type=\"text/javascript\">
var regsettings = {
requiredfields: '{$jsvar_reqfields}',

Zeile 1220Zeile 1219
				regtype: '{$mybb->settings['regtype']}',
hiddencaptchaimage: '{$mybb->settings['hiddencaptchaimage']}'
};

				regtype: '{$mybb->settings['regtype']}',
hiddencaptchaimage: '{$mybb->settings['hiddencaptchaimage']}'
};

		



lang.js_validator_no_username = '{$lang->js_validator_no_username}';

			lang.js_validator_username_length = '{$lang->js_validator_username_length}';
lang.js_validator_invalid_email = '{$lang->js_validator_invalid_email}';
lang.js_validator_email_match = '{$lang->js_validator_email_match}';

			lang.js_validator_username_length = '{$lang->js_validator_username_length}';
lang.js_validator_invalid_email = '{$lang->js_validator_invalid_email}';
lang.js_validator_email_match = '{$lang->js_validator_email_match}';

Zeile 1250Zeile 1250
		);
$user = get_user_by_username($mybb->input['username'], $options);
if(!$user)

		);
$user = get_user_by_username($mybb->input['username'], $options);
if(!$user)

		{

		{

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

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

					error($lang->error_invalidpworusername);

					error($lang->error_invalidpworusername);

					break;
case 1:
error($lang->error_invalidpworusername1);

					break;
case 1:
error($lang->error_invalidpworusername1);

					break;

					break;

				case 2:
error($lang->error_invalidpworusername2);

				case 2:
error($lang->error_invalidpworusername2);

					break;

					break;

				default:
error($lang->error_invalidpworusername);
break;
}
}
$uid = $user['uid'];

				default:
error($lang->error_invalidpworusername);
break;
}
}
$uid = $user['uid'];

	}
else
{
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
}
if(isset($mybb->input['code']) && $user)
{

	}
else
{
$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
}
if(isset($mybb->input['code']) && $user)
{

		$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND (type='r' OR type='e' OR type='b')");
$activation = $db->fetch_array($query);
if(!$activation['uid'])
{
error($lang->error_alreadyactivated);

		$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND (type='r' OR type='e' OR type='b')");
$activation = $db->fetch_array($query);
if(!$activation['uid'])
{
error($lang->error_alreadyactivated);

		}

		}

		if($activation['code'] !== $mybb->get_input('code'))
{
error($lang->error_badactivationcode);

		if($activation['code'] !== $mybb->get_input('code'))
{
error($lang->error_badactivationcode);

Zeile 1292Zeile 1292
		}

$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')");

		}

$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')");





		if($user['usergroup'] == 5 && $activation['type'] != "e" && $activation['type'] != "b")
{
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");

$cache->update_awaitingactivation();

		if($user['usergroup'] == 5 && $activation['type'] != "e" && $activation['type'] != "b")
{
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");

$cache->update_awaitingactivation();

		}

		}

		if($activation['type'] == "e")

		if($activation['type'] == "e")

		{

		{

			$newemail = array(
"email" => $db->escape_string($activation['misc']),

			$newemail = array(
"email" => $db->escape_string($activation['misc']),

			);

			);

			$db->update_query("users", $newemail, "uid='".$user['uid']."'");
$plugins->run_hooks("member_activate_emailupdated");

			$db->update_query("users", $newemail, "uid='".$user['uid']."'");
$plugins->run_hooks("member_activate_emailupdated");





			redirect("usercp.php", $lang->redirect_emailupdated);
}
elseif($activation['type'] == "b")

			redirect("usercp.php", $lang->redirect_emailupdated);
}
elseif($activation['type'] == "b")

Zeile 1322Zeile 1322
		else
{
$plugins->run_hooks("member_activate_accountactivated");

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





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

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

		}

		}

	}
else
{

	}
else
{

Zeile 1342Zeile 1342
		output_page($activate);
}
}

		output_page($activate);
}
}





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

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





	if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);

	if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);

Zeile 1394Zeile 1394
				if($user['usergroup'] == 5)
{
if(!$user['code'])

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

					{

					{

						$user['code'] = random_str();
$uid = $user['uid'];
$awaitingarray = array(

						$user['code'] = random_str();
$uid = $user['uid'];
$awaitingarray = array(

Zeile 1512Zeile 1512
		}
}


		}
}


	$email = $db->escape_string($email);

 
	$query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->get_input('email'))."'");
$numusers = $db->num_rows($query);
if($numusers < 1)

	$query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->get_input('email'))."'");
$numusers = $db->num_rows($query);
if($numusers < 1)

Zeile 1762Zeile 1761
	);

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

	);

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

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




	if(!empty($user_loginattempts))
{
$user['loginattempts'] = (int)$user_loginattempts['loginattempts'];
}


$loginhandler->set_data($user);
$validated = $loginhandler->validate_login();


$loginhandler->set_data($user);
$validated = $loginhandler->validate_login();

Zeile 1772Zeile 1774
		$mybb->input['action'] = "login";
$mybb->request_method = "get";


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


		$login_user = get_user_by_username($user['username'], array('fields' => 'uid'));






		$login_user_uid = 0;
if(!empty($loginhandler->login_data))
{
$login_user_uid = (int)$loginhandler->login_data['uid'];
$user['loginattempts'] = (int)$loginhandler->login_data['loginattempts'];
}


// Is a fatal call if user has had too many tries


// Is a fatal call if user has had too many tries

		$logins = login_attempt_check($login_user['uid']);

		$logins = login_attempt_check($login_user_uid);





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

		$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "uid='".$login_user_uid."'", 1, true);


$errors = $loginhandler->get_friendly_errors();


$errors = $loginhandler->get_friendly_errors();


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

 

// If we need a captcha set it here


// 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(
$mybb->settings['failedcaptchalogincount'] > 0 &&
(
(
isset($user['loginattempts']) &&
$user['loginattempts'] > $mybb->settings['failedcaptchalogincount']
) ||
(
isset($mybb->cookies['loginattempts']) &&
(int)$mybb->cookies['loginattempts'] > $mybb->settings['failedcaptchalogincount']
)
)
)

		{
$do_captcha = true;
$correct = $loginhandler->captcha_verified;

		{
$do_captcha = true;
$correct = $loginhandler->captcha_verified;

		}

		}

	}
else if($validated && $loginhandler->captcha_verified == true)
{

	}
else if($validated && $loginhandler->captcha_verified == true)
{

Zeile 1827Zeile 1844
			redirect($mybb->input['url'], $lang->redirect_loggedin);
}
else

			redirect($mybb->input['url'], $lang->redirect_loggedin);
}
else

		{


		{


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

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

Zeile 1869Zeile 1886
	{
require_once MYBB_ROOT.'inc/class_captcha.php';
$login_captcha = new captcha(false, "post_captcha");

	{
require_once MYBB_ROOT.'inc/class_captcha.php';
$login_captcha = new captcha(false, "post_captcha");


if($login_captcha->type == 1)


if($login_captcha->type == captcha::DEFAULT_CAPTCHA)

		{
if(!$correct)
{

		{
if(!$correct)
{

Zeile 1881Zeile 1898
				$captcha = $login_captcha->build_hidden_captcha();
}
}

				$captcha = $login_captcha->build_hidden_captcha();
}
}

		elseif(in_array($login_captcha->type, array(4, 5, 8)))

		elseif(in_array($login_captcha->type, array(captcha::NOCAPTCHA_RECAPTCHA, captcha::RECAPTCHA_INVISIBLE, captcha::RECAPTCHA_V3)))

		{
$login_captcha->build_recaptcha();
}

		{
$login_captcha->build_recaptcha();
}

		elseif(in_array($login_captcha->type, array(6, 7)))

		elseif(in_array($login_captcha->type, array(captcha::HCAPTCHA, captcha::HCAPTCHA_INVISIBLE)))

		{
$login_captcha->build_hcaptcha();
}

		{
$login_captcha->build_hcaptcha();
}

Zeile 1912Zeile 1929
	{
$mybb->input['action'] = "login";
$mybb->request_method = "get";

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





		$inline_errors = inline_error($errors);

		$inline_errors = inline_error($errors);

	}


	}


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

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

			break;

			break;

		case 2:
$lang->username = $lang->username2;
break;
default:
break;
}

		case 2:
$lang->username = $lang->username2;
break;
default:
break;
}





	$plugins->run_hooks("member_login_end");

eval("\$login = \"".$templates->get("member_login")."\";");
output_page($login);

	$plugins->run_hooks("member_login_end");

eval("\$login = \"".$templates->get("member_login")."\";");
output_page($login);

}

}


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

if(!$mybb->user['uid'])


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

if(!$mybb->user['uid'])

	{

	{

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

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

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

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

	{
error($lang->error_notloggedout);
}

	{
error($lang->error_notloggedout);
}

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

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

Zeile 1963Zeile 1980
		// Run this after the shutdown query from session system
$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET lastvisit='{$time}', lastactive='{$time}' WHERE uid='{$mybb->user['uid']}'");
$db->delete_query("sessions", "sid = '{$session->sid}'");

		// Run this after the shutdown query from session system
$db->shutdown_query("UPDATE ".TABLE_PREFIX."users SET lastvisit='{$time}', lastactive='{$time}' WHERE uid='{$mybb->user['uid']}'");
$db->delete_query("sessions", "sid = '{$session->sid}'");

	}

$plugins->run_hooks("member_logout_end");

	}

$plugins->run_hooks("member_logout_end");


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


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

Zeile 2031Zeile 2048
	$me_username = $memprofile['username'];
$memprofile['username'] = htmlspecialchars_uni($memprofile['username']);
$lang->profile = $lang->sprintf($lang->profile, $memprofile['username']);

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





	// Get member's permissions
$memperms = user_permissions($memprofile['uid']);


	// Get member's permissions
$memperms = user_permissions($memprofile['uid']);


Zeile 2048Zeile 2065
	{
$memperms = array_merge($memperms, $displaygroup);
}

	{
$memperms = array_merge($memperms, $displaygroup);
}





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


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


Zeile 2064Zeile 2081
	eval("\$avatar = \"".$templates->get("member_profile_avatar")."\";");

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

	eval("\$avatar = \"".$templates->get("member_profile_avatar")."\";");

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





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

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

Zeile 2130Zeile 2147
		if($memperms['signofollow'])
{
$sig_parser['nofollow_on'] = 1;

		if($memperms['signofollow'])
{
$sig_parser['nofollow_on'] = 1;

		}

		}





		if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

		if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

		{
$sig_parser['allow_imgcode'] = 0;
}

		{
$sig_parser['allow_imgcode'] = 0;
}

Zeile 2142Zeile 2159
	}

$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);

	}

$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);





	if($daysreg < 1)
{
$daysreg = 1;

	if($daysreg < 1)
{
$daysreg = 1;

	}

	}


$stats = $cache->read("stats");



$stats = $cache->read("stats");


Zeile 2154Zeile 2171
	$ppd = $memprofile['postnum'] / $daysreg;
$ppd = round($ppd, 2);
if($ppd > $memprofile['postnum'])

	$ppd = $memprofile['postnum'] / $daysreg;
$ppd = round($ppd, 2);
if($ppd > $memprofile['postnum'])

	{

	{

		$ppd = $memprofile['postnum'];
}


		$ppd = $memprofile['postnum'];
}


Zeile 2162Zeile 2179
	if($numposts == 0)
{
$post_percent = "0";

	if($numposts == 0)
{
$post_percent = "0";

	}
else
{

	}
else
{

		$post_percent = $memprofile['postnum']*100/$numposts;
$post_percent = round($post_percent, 2);

		$post_percent = $memprofile['postnum']*100/$numposts;
$post_percent = round($post_percent, 2);

	}


	}


	if($post_percent > 100)
{
$post_percent = 100;

	if($post_percent > 100)
{
$post_percent = 100;

	}

	}


// Format thread count, per day count and percent of total
$tpd = $memprofile['threadnum'] / $daysreg;


// Format thread count, per day count and percent of total
$tpd = $memprofile['threadnum'] / $daysreg;

Zeile 2180Zeile 2197
	if($tpd > $memprofile['threadnum'])
{
$tpd = $memprofile['threadnum'];

	if($tpd > $memprofile['threadnum'])
{
$tpd = $memprofile['threadnum'];

	}

	}


$numthreads = $stats['numthreads'];
if($numthreads == 0)


$numthreads = $stats['numthreads'];
if($numthreads == 0)

	{

	{

		$thread_percent = "0";
}
else

		$thread_percent = "0";
}
else

	{

	{

		$thread_percent = $memprofile['threadnum']*100/$numthreads;
$thread_percent = round($thread_percent, 2);
}

		$thread_percent = $memprofile['threadnum']*100/$numthreads;
$thread_percent = round($thread_percent, 2);
}

Zeile 2196Zeile 2213
	if($thread_percent > 100)
{
$thread_percent = 100;

	if($thread_percent > 100)
{
$thread_percent = 100;

	}

	}


$findposts = $findthreads = '';
if($mybb->usergroup['cansearch'] == 1)


$findposts = $findthreads = '';
if($mybb->usergroup['cansearch'] == 1)

	{

	{

		if(!empty($memprofile['postnum']))
{
eval("\$findposts = \"".$templates->get("member_profile_findposts")."\";");

		if(!empty($memprofile['postnum']))
{
eval("\$findposts = \"".$templates->get("member_profile_findposts")."\";");

		}

		}

		if(!empty($memprofile['threadnum']))
{
eval("\$findthreads = \"".$templates->get("member_profile_findthreads")."\";");

		if(!empty($memprofile['threadnum']))
{
eval("\$findthreads = \"".$templates->get("member_profile_findthreads")."\";");

		}

		}

	}

$awaybit = '';

	}

$awaybit = '';

Zeile 2220Zeile 2237
		{
$reason = $parser->parse_badwords($memprofile['awayreason']);
$awayreason = htmlspecialchars_uni($reason);

		{
$reason = $parser->parse_badwords($memprofile['awayreason']);
$awayreason = htmlspecialchars_uni($reason);

		}

		}

		else
{
$awayreason = $lang->away_no_reason;

		else
{
$awayreason = $lang->away_no_reason;

		}

		}

		if($memprofile['returndate'] == '')
{
$returndate = "$lang->unknown";

		if($memprofile['returndate'] == '')
{
$returndate = "$lang->unknown";

		}

		}

		else
{
$returnhome = explode("-", $memprofile['returndate']);

		else
{
$returnhome = explode("-", $memprofile['returndate']);





			// PHP native date functions use integers so timestamps for years after 2038 will not work
// Thus we use adodb_mktime
if($returnhome[2] >= 2038)

			// PHP native date functions use integers so timestamps for years after 2038 will not work
// Thus we use adodb_mktime
if($returnhome[2] >= 2038)

			{

			{

				require_once MYBB_ROOT."inc/functions_time.php";
$returnmkdate = adodb_mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);
$returndate = my_date($mybb->settings['dateformat'], $returnmkdate, "", 1, true);

				require_once MYBB_ROOT."inc/functions_time.php";
$returnmkdate = adodb_mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);
$returndate = my_date($mybb->settings['dateformat'], $returnmkdate, "", 1, true);

			}

			}

			else
{
$returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);

			else
{
$returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);

Zeile 2261Zeile 2278
		if($memprofile['away'] == 1)
{
eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");

		if($memprofile['away'] == 1)
{
eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");

		}
}

$memprofile['timezone'] = (float)$memprofile['timezone'];


		}
}

$memprofile['timezone'] = (float)$memprofile['timezone'];


	if($memprofile['dst'] == 1)
{
$memprofile['timezone']++;

	if($memprofile['dst'] == 1)
{
$memprofile['timezone']++;

Zeile 2294Zeile 2311
				$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);
$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]);
$membday = date($bdayformat, $membday);

				$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);
$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]);
$membday = date($bdayformat, $membday);





				$membdayage = $lang->membdayage;
}
elseif($membday[2])

				$membdayage = $lang->membdayage;
}
elseif($membday[2])

Zeile 2353Zeile 2370
				if($memprofile['postnum'] >= $title['posts'])
{
$usertitle = $title['title'];

				if($memprofile['postnum'] >= $title['posts'])
{
$usertitle = $title['title'];

					$stars = $title['stars'];
$starimage = $title['starimage'];

break;
}
}
}
}


					$stars = $title['stars'];
$starimage = $title['starimage'];

break;
}
}
}
}


	$usertitle = htmlspecialchars_uni($usertitle);

if($memperms['stars'] || $memperms['usertitle'])

	$usertitle = htmlspecialchars_uni($usertitle);

if($memperms['stars'] || $memperms['usertitle'])

	{

	{

		// Set the number of stars if display group has constant number of stars
$stars = $memperms['stars'];
}

		// Set the number of stars if display group has constant number of stars
$stars = $memperms['stars'];
}

Zeile 2393Zeile 2410

$groupimage = '';
if(!empty($memperms['image']))


$groupimage = '';
if(!empty($memperms['image']))

	{

	{

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

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

Zeile 2459Zeile 2476
				$location_time = my_date($mybb->settings['timeformat'], $last_seen);

eval("\$online_status = \"".$templates->get("member_profile_online")."\";");

				$location_time = my_date($mybb->settings['timeformat'], $last_seen);

eval("\$online_status = \"".$templates->get("member_profile_online")."\";");

			}
}

			}
}

	}

if(!isset($online_status))

	}

if(!isset($online_status))

Zeile 2520Zeile 2537
			$warning_level = 100;
}


			$warning_level = 100;
}


		$warn_user = '';
$warning_link = 'usercp.php';

 
		$warning_level = get_colored_warning_level($warning_level);

		$warning_level = get_colored_warning_level($warning_level);

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

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

		{
eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");

		{
eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");

			$warning_link = "warnings.php?uid={$memprofile['uid']}";
}

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




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


	$bgcolor = $alttrow = 'trow1';
$customfields = $profilefields = '';


	$bgcolor = $alttrow = 'trow1';
$customfields = $profilefields = '';


Zeile 2595Zeile 2612
						$parser_options['nl2br'] = 0;
}


						$parser_options['nl2br'] = 0;
}


					if($mybb->user['showimages'] != 1 && $mybb->user['uid'] != 0 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

					if($mybb->user['uid'] != 0 && $mybb->user['showimages'] != 1 || $mybb->settings['guestimages'] != 1 && $mybb->user['uid'] == 0)

					{
$parser_options['allow_imgcode'] = 0;
}

					{
$parser_options['allow_imgcode'] = 0;
}

Zeile 2646Zeile 2663
		{
$banlength = $lang->permanent;
$timeremaining = $lang->na;

		{
$banlength = $lang->permanent;
$timeremaining = $lang->na;

 
			$banned_class = "normal_banned";

		}
else
{

		}
else
{

Zeile 2674Zeile 2692
			{
$banned_class = "normal_banned";
}

			{
$banned_class = "normal_banned";
}


eval('$timeremaining = "'.$templates->get('member_profile_banned_remaining').'";');

 
		}

		}

 
		eval('$timeremaining = "'.$templates->get('member_profile_banned_remaining').'";');


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



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


Zeile 2724Zeile 2741
			$memprofile['usernotes'] = $lang->no_usernotes;
}


			$memprofile['usernotes'] = $lang->no_usernotes;
}


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

		if($mybb->usergroup['caneditprofiles'] == 1 && modcp_can_manage_user($memprofile['uid']))

		{

		{

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

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

			if(modcp_can_manage_user($memprofile['uid']))







			{

			{

				eval("\$manageban = \"".$templates->get("member_profile_modoptions_manageban")."\";");



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


			}

			}

			else









		}

if($memperms['isbannedgroup'] == 1 && $mybb->usergroup['canbanusers'] == 1 && modcp_can_manage_user($memprofile['uid']))
{
eval("\$manageban = \"".$templates->get("member_profile_modoptions_manageban")."\";");
}
elseif(modcp_can_manage_user($memprofile['uid']) && $mybb->usergroup['canbanusers'] == 1)
{
if(modcp_can_manage_user($memprofile['uid']) && $mybb->usergroup['canbanusers'] == 1)

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


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


 
		$purgespammer = '';

		if($can_purge_spammer)
{
eval("\$purgespammer = \"".$templates->get('member_profile_modoptions_purgespammer')."\";");

		if($can_purge_spammer)
{
eval("\$purgespammer = \"".$templates->get('member_profile_modoptions_purgespammer')."\";");