Vergleich member.php - 1.8.29 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 391Zeile 391
			$captcha->invalidate_captcha();
}


			$captcha->invalidate_captcha();
}


		if($mybb->settings['regtype'] != "randompass" && !isset($mybb->cookies['coppauser']))

		if($mybb->settings['regtype'] != "randompass" && empty($mybb->cookies['coppauser']))

		{
// Log them in
my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true, "lax");
}


		{
// Log them in
my_setcookie("mybbuser", $user_info['uid']."_".$user_info['loginkey'], null, true, "lax");
}


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

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

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

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

Zeile 718Zeile 718
		$birthday_year = '';
}


		$birthday_year = '';
}


 
	$under_thirteen = false;


	// Is COPPA checking enabled?
if($mybb->settings['coppa'] != "disabled" && !isset($mybb->input['step']))
{

	// Is COPPA checking enabled?
if($mybb->settings['coppa'] != "disabled" && !isset($mybb->input['step']))
{

Zeile 742Zeile 744
			{
my_setcookie("coppauser", 1, -0);
$under_thirteen = true;

			{
my_setcookie("coppauser", 1, -0);
$under_thirteen = true;

 
			}
else
{
my_setcookie("coppauser", 0, -0);

			}
$mybb->request_method = "";
}

			}
$mybb->request_method = "";
}

Zeile 763Zeile 769
	{
$coppa_agreement = '';
// Is this user a COPPA user? We need to show the COPPA agreement too

	{
$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))

		if($mybb->settings['coppa'] != "disabled" && (!empty($mybb->cookies['coppauser']) || $under_thirteen))

		{
if($mybb->settings['coppa'] == "deny")
{

		{
if($mybb->settings['coppa'] == "deny")
{

Zeile 799Zeile 805
		$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);

$stylelist = build_theme_select("style");

		$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);

$stylelist = build_theme_select("style");





		if($mybb->settings['usertppoptions'])
{
$tppoptions = '';

		if($mybb->settings['usertppoptions'])
{
$tppoptions = '';

Zeile 829Zeile 835
				}
}
eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");

				}
}
eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");

		}

		}

		if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])
{
if(isset($mybb->cookies['mybb']['referrer']))

		if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])
{
if(isset($mybb->cookies['mybb']['referrer']))

Zeile 839Zeile 845
				$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 849Zeile 855
			elseif(!empty($referrername))
{
$ref = get_user_by_username($referrername);

			elseif(!empty($referrername))
{
$ref = get_user_by_username($referrername);

				if(!$ref['uid'])

				if(!$ref)

				{
$errors[] = $lang->error_badreferrer;
}

				{
$errors[] = $lang->error_badreferrer;
}

Zeile 901Zeile 907
				$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']);

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

Zeile 921Zeile 927
					if(!empty($errors))
{
$useropts = $userfield;

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

					}

					}

					else

					else

					{

					{

						$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

						$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

						{

						{

							$seloptions[$val] = $val;

							$seloptions[$val] = $val;

						}

						}

					}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

					}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

						{

						{

							$val = trim($val);
$val = str_replace("\n", "\\n", $val);

							$val = trim($val);
$val = str_replace("\n", "\\n", $val);





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

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

							{
$sel = ' selected="selected"';
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])
{

							{
$sel = ' selected="selected"';
}

eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])
{

							$profilefield['length'] = 3;
}


							$profilefield['length'] = 3;
}


Zeile 958Zeile 964
					}
}
elseif($type == "select")

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

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

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

						foreach($expoptions as $key => $val)
{
$val = trim($val);

						foreach($expoptions as $key => $val)
{
$val = trim($val);

Zeile 980Zeile 986
						}

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

						}

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

					}
}
elseif($type == "radio")
{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

					}
}
elseif($type == "radio")
{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

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

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

Zeile 1277Zeile 1283
	{
$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND (type='r' OR type='e' OR type='b')");
$activation = $db->fetch_array($query);

	{
$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'])

		if(!$activation)

		{
error($lang->error_alreadyactivated);
}

		{
error($lang->error_alreadyactivated);
}

Zeile 1456Zeile 1462
	$query = $db->simple_select("awaitingactivation", "*", "uid='".$mybb->user['uid']."' AND type='b'");
$activation = $db->fetch_array($query);


	$query = $db->simple_select("awaitingactivation", "*", "uid='".$mybb->user['uid']."' AND type='b'");
$activation = $db->fetch_array($query);


	if($activation['validated'] == 1)

	if($activation && $activation['validated'] == 1)

	{
error($lang->error_activated_by_admin);

	{
error($lang->error_activated_by_admin);

	}

$captcha = '';
// Generate CAPTCHA?
if($mybb->settings['captchaimage'])
{
require_once MYBB_ROOT.'inc/class_captcha.php';
$post_captcha = new captcha(true, "post_captcha");

if($post_captcha->html)

	}

$captcha = '';
// Generate CAPTCHA?
if($mybb->settings['captchaimage'])
{
require_once MYBB_ROOT.'inc/class_captcha.php';
$post_captcha = new captcha(true, "post_captcha");

if($post_captcha->html)

		{
$captcha = $post_captcha->html;
}

		{
$captcha = $post_captcha->html;
}

	}

	}


if(isset($errors) && count($errors) > 0)
{


if(isset($errors) && count($errors) > 0)
{

Zeile 1494Zeile 1500
if($mybb->input['action'] == "do_lostpw" && $mybb->request_method == "post")
{
$plugins->run_hooks("member_do_lostpw_start");

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


$errors = array();

if($mybb->settings['captchaimage'])
{


$errors = array();

if($mybb->settings['captchaimage'])
{

		require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha;


		require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha;


Zeile 1555Zeile 1561
						break;
}
my_mail($email, $emailsubject, $emailmessage);

						break;
}
my_mail($email, $emailsubject, $emailmessage);

			}

$plugins->run_hooks("member_do_lostpw_end");


			}

$plugins->run_hooks("member_do_lostpw_end");


			redirect("index.php", $lang->redirect_lostpwsent, "", true);
}
else

			redirect("index.php", $lang->redirect_lostpwsent, "", true);
}
else

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

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

					error($lang->error_invalidpworusername);
break;

					error($lang->error_invalidpworusername);
break;

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

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

Zeile 1660Zeile 1666
		require_once MYBB_ROOT.'inc/datahandlers/user.php';
$userhandler = new UserDataHandler('update');


		require_once MYBB_ROOT.'inc/datahandlers/user.php';
$userhandler = new UserDataHandler('update');


		while(!$userhandler->verify_password())

		do

		{
$password = random_str($password_length, $mybb->settings['requirecomplexpasswords']);


		{
$password = random_str($password_length, $mybb->settings['requirecomplexpasswords']);


Zeile 1673Zeile 1679

$userhandler->set_validated(true);
$userhandler->errors = array();


$userhandler->set_validated(true);
$userhandler->errors = array();

		}

		} while(!$userhandler->verify_password());


$userhandler->update_user();

$logindetails = array(
'salt' => $userhandler->data['salt'],


$userhandler->update_user();

$logindetails = array(
'salt' => $userhandler->data['salt'],

			'password'	=> $userhandler->data['saltedpw'],

			'password'	=> $userhandler->data['password'],

			'loginkey'	=> $userhandler->data['loginkey'],
);


			'loginkey'	=> $userhandler->data['loginkey'],
);


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

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

				break;

				break;

			default:
$lang_username = $lang->username;
break;

			default:
$lang_username = $lang->username;
break;

		}


		}


		$code = htmlspecialchars_uni($mybb->get_input('code'));

		$code = htmlspecialchars_uni($mybb->get_input('code'));


if(!isset($mybb->input['username']))
{
$input_username = '';
}
$input_username = htmlspecialchars_uni($mybb->input['username']);

		
$input_username = htmlspecialchars_uni($mybb->get_input('username'));






eval("\$activate = \"".$templates->get("member_resetpassword")."\";");
output_page($activate);


eval("\$activate = \"".$templates->get("member_resetpassword")."\";");
output_page($activate);

Zeile 1770Zeile 1772
	$validated = $loginhandler->validate_login();

if(!$validated)

	$validated = $loginhandler->validate_login();

if(!$validated)

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


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


		$login_user_uid = 0;
if(!empty($loginhandler->login_data))
{

		$login_user_uid = 0;
if(!empty($loginhandler->login_data))
{

Zeile 1892Zeile 1894
			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 1952Zeile 1954
}

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

}

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

{

{

	$plugins->run_hooks("member_logout_start");

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

	$plugins->run_hooks("member_logout_start");

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

Zeile 2345Zeile 2347
	}

// Get the user title for this user

	}

// Get the user title for this user

	unset($usertitle);

 
	unset($stars);

	unset($stars);

 
	$usertitle = '';

	$starimage = '';
if(trim($memprofile['usertitle']) != '')
{

	$starimage = '';
if(trim($memprofile['usertitle']) != '')
{

Zeile 2360Zeile 2362
	}
else
{

	}
else
{

		// No usergroup title so get a default one
$usertitles = $cache->read('usertitles');



		if(!isset($usertitles))
{
$usertitles = $cache->read('usertitles');
}





 
		// No usergroup title so get a default one

		if(is_array($usertitles))
{
foreach($usertitles as $title)

		if(is_array($usertitles))
{
foreach($usertitles as $title)

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

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

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

break;
}
}
}
}

$usertitle = htmlspecialchars_uni($usertitle);

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

break;
}
}
}
}

$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'];
}


if($memperms['stars'] || $memperms['usertitle'])
{
// Set the number of stars if display group has constant number of stars
$stars = $memperms['stars'];
}

	elseif(!$stars)

	elseif(!isset($stars))

	{

	{

		if(!is_array($usertitles))

		if(!isset($usertitles))

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

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

Zeile 2405Zeile 2410
					break;
}
}

					break;
}
}

 
		}

if(!isset($stars))
{
$stars = 0;

		}
}


		}
}


Zeile 2435Zeile 2445
		$starimage = str_replace("{theme}", $theme['imgdir'], $starimage);
$userstars = '';
for($i = 0; $i < $stars; ++$i)

		$starimage = str_replace("{theme}", $theme['imgdir'], $starimage);
$userstars = '';
for($i = 0; $i < $stars; ++$i)

		{

		{

			eval("\$userstars .= \"".$templates->get("member_profile_userstar", 1, 0)."\";");
}
}

			eval("\$userstars .= \"".$templates->get("member_profile_userstar", 1, 0)."\";");
}
}

Zeile 2585Zeile 2595
						{
eval("\$customfield_val .= \"".$templates->get("member_profile_customfields_field_multi_item")."\";");
}

						{
eval("\$customfield_val .= \"".$templates->get("member_profile_customfields_field_multi_item")."\";");
}

					}

					}

					if($customfield_val != '')
{
eval("\$customfieldval = \"".$templates->get("member_profile_customfields_field_multi")."\";");

					if($customfield_val != '')
{
eval("\$customfieldval = \"".$templates->get("member_profile_customfields_field_multi")."\";");

Zeile 2648Zeile 2658
	{
// 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));

	{
// 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'])

		if($db->num_rows($query))

		{

		{

			$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;
$banned_class = "normal_banned";
}
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))."";

$banned_class = '';
if($remaining < 3600)
{
$banned_class = "high_banned";

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

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



















			}

			}

			else if($remaining < 86400)



if($memban['lifted'] == 'perm' || $memban['lifted'] == '' || $memban['bantime'] == 'perm' || $memban['bantime'] == '---')

			{

			{

				$banned_class = "moderate_banned";
}
else if($remaining < 604800)
{
$banned_class = "low_banned";

				$banlength = $lang->permanent;
$timeremaining = $lang->na;
$banned_class = "normal_banned";



			}
else
{

			}
else
{

				$banned_class = "normal_banned";

























				// 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))."";

$banned_class = '';
if($remaining < 3600)
{
$banned_class = "high_banned";
}
else if($remaining < 86400)
{
$banned_class = "moderate_banned";
}
else if($remaining < 604800)
{
$banned_class = "low_banned";
}
else
{
$banned_class = "normal_banned";
}

			}

			}

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

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

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








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









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

// Display a nice warning to the user
eval('$bannedbit = "'.$templates->get('member_profile_banned').'";');
}
else
{
// TODO: more specific output for converted/merged boards where no ban record is merged.
$bannedbit = '';
}

	}

$adminoptions = '';

	}

$adminoptions = '';

Zeile 2891Zeile 2910
		$last_email = $db->fetch_array($query);

// Users last email was within the flood time, show the error

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

// Users last email was within the flood time, show the error

		if($last_email['mid'])

		if(isset($last_email['mid']))

		{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);


		{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);


Zeile 3064Zeile 3083
		$last_email = $db->fetch_array($query);

// Users last email was within the flood time, show the error

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

// Users last email was within the flood time, show the error

		if($last_email['mid'])

		if(isset($last_email['mid']))

		{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);


		{
$remaining_time = ($mybb->usergroup['emailfloodtime']*60)-(TIME_NOW-$last_email['dateline']);