Vergleich member.php - 1.6.10 - 1.6.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 148Zeile 148
		"subscriptionmethod" => $mybb->input['subscriptionmethod'],
"receivepms" => $mybb->input['receivepms'],
"pmnotice" => $mybb->input['pmnotice'],

		"subscriptionmethod" => $mybb->input['subscriptionmethod'],
"receivepms" => $mybb->input['receivepms'],
"pmnotice" => $mybb->input['pmnotice'],

		"emailpmnotify" => $mybb->input['emailpmnotify'],

		"pmnotify" => $mybb->input['pmnotify'],

		"invisible" => $mybb->input['invisible'],
"dstcorrection" => $mybb->input['dstcorrection']
);

		"invisible" => $mybb->input['invisible'],
"dstcorrection" => $mybb->input['dstcorrection']
);

Zeile 217Zeile 217
			$pmnoticecheck = " checked=\"checked\"";
}


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


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

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

		{

		{

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

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

		}

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

		}

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

Zeile 247Zeile 247
	else
{
$user_info = $userhandler->insert_user();

	else
{
$user_info = $userhandler->insert_user();

 

// Invalidate solved captcha
if($mybb->settings['captchaimage'])
{
$captcha->invalidate_captcha();
}


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


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

Zeile 281Zeile 287
					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 292Zeile 298
			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);
}
else if($mybb->settings['regtype'] == "randompass")

			$plugins->run_hooks("member_do_register_end");

error($lang->redirect_registered_activation);
}
else if($mybb->settings['regtype'] == "randompass")

		{

		{

			$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);
switch($mybb->settings['username_method'])
{
case 0:

			$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);
switch($mybb->settings['username_method'])
{
case 0:

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

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

				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;

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

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

$plugins->run_hooks("member_do_register_end");

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

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

		{

		{

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

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





	$bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";
$mybb->input['bday3'] = intval($mybb->input['bday3']);


	$bdaymonthsel[$mybb->input['bday2']] = "selected=\"selected\"";
$mybb->input['bday3'] = intval($mybb->input['bday3']);


Zeile 382Zeile 388
		if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3'])
{
my_unsetcookie("coppauser");

		if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3'])
{
my_unsetcookie("coppauser");

 
			
$mybb->input['bday1'] = intval($mybb->input['bday1']);
$mybb->input['bday2'] = intval($mybb->input['bday2']);
$mybb->input['bday3'] = intval($mybb->input['bday3']);
$months = get_bdays($mybb->input['bday3']);
if($mybb->input['bday2'] < 1 || $mybb->input['bday2'] > 12 || $mybb->input['bday3'] < (date("Y")-100) || $mybb->input['bday3'] > date("Y") || $mybb->input['bday1'] > $months[$mybb->input['bday2']-1])
{
error($lang->error_invalid_birthday);
}

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


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


Zeile 515Zeile 530
		}
// Custom profile fields baby!
$altbg = "trow1";

		}
// Custom profile fields baby!
$altbg = "trow1";

		$query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));

		$query = $db->simple_select("profilefields", "*", "required='1' AND editable='1'", array('order_by' => 'disporder'));

		while($profilefield = $db->fetch_array($query))
{
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

		while($profilefield = $db->fetch_array($query))
{
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

Zeile 572Zeile 587
				}
}
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 690Zeile 705
			$emailnotifycheck = '';
$receivepmscheck = "checked=\"checked\"";
$pmnoticecheck = " checked=\"checked\"";

			$emailnotifycheck = '';
$receivepmscheck = "checked=\"checked\"";
$pmnoticecheck = " checked=\"checked\"";

			$emailpmnotifycheck = '';

			$pmnotifycheck = '';

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

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

Zeile 751Zeile 766
		foreach($languages as $lname => $language)
{
$language = htmlspecialchars_uni($language);

		foreach($languages as $lname => $language)
{
$language = htmlspecialchars_uni($language);

			if($user['language'] == $lname)

			if(isset($user['language']) && $user['language'] == $lname)

			{
$langoptions .= "<option value=\"$lname\" selected=\"selected\">$language</option>\n";
}

			{
$langoptions .= "<option value=\"$lname\" selected=\"selected\">$language</option>\n";
}

Zeile 774Zeile 789

if($mybb->input['username'])
{


if($mybb->input['username'])
{

		switch($mybb->settings['username'])

		switch($mybb->settings['username_method'])

		{
case 0:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));

		{
case 0:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));

Zeile 1068Zeile 1083
		if($password_length < 8)
{
$password_length = 8;

		if($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']);

Zeile 1076Zeile 1091
		$email = $user['email'];

$plugins->run_hooks("member_resetpassword_process");

		$email = $user['email'];

$plugins->run_hooks("member_resetpassword_process");





		$emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']);
$emailmessage = $lang->sprintf($lang->email_passwordreset, $username, $mybb->settings['bbname'], $password);
my_mail($email, $emailsubject, $emailmessage);

		$emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']);
$emailmessage = $lang->sprintf($lang->email_passwordreset, $username, $mybb->settings['bbname'], $password);
my_mail($email, $emailsubject, $emailmessage);





		$plugins->run_hooks("member_resetpassword_reset");

error($lang->redirect_passwordreset);

		$plugins->run_hooks("member_resetpassword_reset");

error($lang->redirect_passwordreset);

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

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

		

		

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

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

				$lang_username = $lang->username;

				$lang_username = $lang->username;

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

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

				break;

				break;

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

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

Zeile 1107Zeile 1122

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


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

	}
}


	}
}


$correct = false;
$inline_errors = '';
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")

$correct = false;
$inline_errors = '';
if($mybb->input['action'] == "do_login" && $mybb->request_method == "post")

Zeile 1127Zeile 1142
		$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'];

	}


	}


	if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);
switch($mybb->settings['username_method'])
{
case 0:

	if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);
switch($mybb->settings['username_method'])
{
case 0:

				error($lang->error_invalidpworusername.$login_text);
break;

				error($lang->error_invalidpworusername.$login_text);
break;

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

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

Zeile 1146Zeile 1161
			default:
error($lang->error_invalidpworusername.$login_text);
break;

			default:
error($lang->error_invalidpworusername.$login_text);
break;

		}
}


		}
}


	$query = $db->simple_select("users", "loginattempts", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."' OR LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
$loginattempts = $db->fetch_field($query, "loginattempts");

$errors = array();


	$query = $db->simple_select("users", "loginattempts", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."' OR LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
$loginattempts = $db->fetch_field($query, "loginattempts");

$errors = array();


 
	$login_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['failedcaptchalogincount'] > 0 && ($loginattempts > $mybb->settings['failedcaptchalogincount'] || intval($mybb->cookies['loginattempts']) > $mybb->settings['failedcaptchalogincount']))
{
// Show captcha image if enabled

Zeile 1230Zeile 1246
		if($user['coppauser'])
{
error($lang->error_awaitingcoppa);

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

		}








		}

// Invalidate captcha
if($login_captcha !== false)
{
$login_captcha->invalidate_captcha();
}


		my_setcookie('loginattempts', 1);
$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
$newsession = array(

		my_setcookie('loginattempts', 1);
$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
$newsession = array(

Zeile 1398Zeile 1420
	if($mybb->user['uid'])
{
$time = TIME_NOW;

	if($mybb->user['uid'])
{
$time = TIME_NOW;

		$lastvisit = array(
"lastactive" => $time-900,
"lastvisit" => $time,
);
$db->update_query("users", $lastvisit, "uid='".$mybb->user['uid']."'");

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

		$db->delete_query("sessions", "sid='".$session->sid."'");
}
$plugins->run_hooks("member_logout_end");

Zeile 1461Zeile 1480
			$uid = intval($mybb->input['uid']);
}
else

			$uid = intval($mybb->input['uid']);
}
else

		{

		{

			$uid = $mybb->user['uid'];
}

			$uid = $mybb->user['uid'];
}

	}


	}


	if($mybb->user['uid'] != $uid)
{
$memprofile = get_user($uid);

	if($mybb->user['uid'] != $uid)
{
$memprofile = get_user($uid);

Zeile 1480Zeile 1499
	if(!$memprofile['uid'])
{
error($lang->error_nomember);

	if(!$memprofile['uid'])
{
error($lang->error_nomember);

	}


	}


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


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


Zeile 1562Zeile 1581
			"me_username" => $memprofile['username'],
"filter_badwords" => 1
);

			"me_username" => $memprofile['username'],
"filter_badwords" => 1
);

 

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


$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser);
eval("\$signature = \"".$templates->get("member_profile_signature")."\";");


$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser);
eval("\$signature = \"".$templates->get("member_profile_signature")."\";");

Zeile 1645Zeile 1669
			// If our away time has expired already, we should be back, right?
if($returnmkdate < TIME_NOW)
{

			// If our away time has expired already, we should be back, right?
if($returnmkdate < TIME_NOW)
{

				$db->update_query('users', array('away' => '0', 'awaydate' => '', 'returndate' => '', 'awayreason' => ''), 'uid=\''.intval($memprofile['uid']).'\'');

				$db->update_query('users', array('away' => '0', 'awaydate' => '0', 'returndate' => '', 'awayreason' => ''), 'uid=\''.intval($memprofile['uid']).'\'');

				
// Update our status to "not away"
$memprofile['away'] = 0;

				
// Update our status to "not away"
$memprofile['away'] = 0;

Zeile 1885Zeile 1909
	}

// Fetch the reputation for this user

	}

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

	if($memperms['usereputationsystem'] == 1 && $displaygroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1)

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

// If this user has permission to give reputations show the vote link
$vote_link = '';

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

// 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'] && ($mybb->settings['posrep'] || $mybb->settings['neurep'] || $mybb->settings['negrep']))

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