Vergleich member.php - 1.6.5 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: member.php 5616 2011-09-20 13:24:59Z Tomm $

 * $Id: member.php 5784 2012-04-19 12:57:48Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

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

			$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 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $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;
}

			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 289Zeile 303
		else if($mybb->settings['regtype'] == "randompass")
{
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);

		else if($mybb->settings['regtype'] == "randompass")
{
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);

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















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


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

		}
else
{

		}
else
{

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

$plugins->run_hooks("member_do_register_end");

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

$plugins->run_hooks("member_do_register_end");

Zeile 355Zeile 383
	{
// Just selected DOB, we check
if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3'])

	{
// Just selected DOB, we check
if($mybb->input['bday1'] && $mybb->input['bday2'] && $mybb->input['bday3'])

		{
my_unsetcookie("coppauser");


		{
my_unsetcookie("coppauser");


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

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

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

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

Zeile 381Zeile 409
			eval("\$coppa = \"".$templates->get("member_register_coppa")."\";");
output_page($coppa);
exit;

			eval("\$coppa = \"".$templates->get("member_register_coppa")."\";");
output_page($coppa);
exit;

		}
}


		}
}


	if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post")
{
// Is this user a COPPA user? We need to show the COPPA agreement too

	if((!isset($mybb->input['agree']) && !isset($mybb->input['regsubmit'])) || $mybb->request_method != "post")
{
// Is this user a COPPA user? We need to show the COPPA agreement too

Zeile 396Zeile 424
			$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");

eval("\$agreement = \"".$templates->get("member_register_agreement")."\";");

		$plugins->run_hooks("member_register_agreement");

eval("\$agreement = \"".$templates->get("member_register_agreement")."\";");

Zeile 409Zeile 437
		$validator_extra = '';

if(isset($mybb->input['timezoneoffset']))

		$validator_extra = '';

if(isset($mybb->input['timezoneoffset']))

		{

		{

			$timezoneoffset = $mybb->input['timezoneoffset'];
}
else

			$timezoneoffset = $mybb->input['timezoneoffset'];
}
else

		{

		{

			$timezoneoffset = $mybb->settings['timezoneoffset'];
}
$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);

			$timezoneoffset = $mybb->settings['timezoneoffset'];
}
$tzselect = build_timezone_select("timezoneoffset", $timezoneoffset, true);

Zeile 435Zeile 463
			eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";");
}
if($mybb->settings['userpppoptions'])

			eval("\$tppselect = \"".$templates->get("usercp_options_tppselect")."\";");
}
if($mybb->settings['userpppoptions'])

		{

		{

			$pppoptions = '';
$explodedppp = explode(",", $mybb->settings['userpppoptions']);
if(is_array($explodedppp))

			$pppoptions = '';
$explodedppp = explode(",", $mybb->settings['userpppoptions']);
if(is_array($explodedppp))

			{

			{

				foreach($explodedppp as $val)
{
$val = trim($val);
$pppoptions .= "<option value=\"$val\">".$lang->sprintf($lang->ppp_option, $val)."</option>\n";
}

				foreach($explodedppp as $val)
{
$val = trim($val);
$pppoptions .= "<option value=\"$val\">".$lang->sprintf($lang->ppp_option, $val)."</option>\n";
}

			}

			}

			eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
}
if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])

			eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";");
}
if($mybb->settings['usereferrals'] == 1 && !$mybb->user['uid'])

Zeile 461Zeile 489
				$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 474Zeile 502
			if($quickreg)
{
$refbg = "trow1";

			if($quickreg)
{
$refbg = "trow1";

			}

			}

			else
{
$refbg = "trow2";

			else
{
$refbg = "trow2";

Zeile 487Zeile 515
		else
{
$referrer = '';

		else
{
$referrer = '';

		}

		}

		// Custom profile fields baby!
$altbg = "trow1";
$query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));

		// Custom profile fields baby!
$altbg = "trow1";
$query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));

Zeile 500Zeile 528
			$select = '';
$field = "fid{$profilefield['fid']}";
if($errors)

			$select = '';
$field = "fid{$profilefield['fid']}";
if($errors)

			{

			{

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

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

			}

			}

			else
{
$userfield = '';
}
if($type == "multiselect")

			else
{
$userfield = '';
}
if($type == "multiselect")

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

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

					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

Zeile 538Zeile 566
							$sel = "selected=\"selected\"";
}
$select .= "<option value=\"$val\" $sel>$val</option>\n";

							$sel = "selected=\"selected\"";
}
$select .= "<option value=\"$val\" $sel>$val</option>\n";

					}
if(!$profilefield['length'])
{

					}
if(!$profilefield['length'])
{

						$profilefield['length'] = 3;
}
$code = "<select name=\"profile_fields[$field][]\" id=\"{$field}\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";

						$profilefield['length'] = 3;
}
$code = "<select name=\"profile_fields[$field][]\" id=\"{$field}\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";

Zeile 590Zeile 618
				if($errors)
{
$useropts = $userfield;

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

				}
else
{

				}
else
{

					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))

				{

				{

					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

					foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

Zeile 617Zeile 645
				}
}
elseif($type == "textarea")

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

			{
$value = htmlspecialchars_uni($userfield);

			{
$value = htmlspecialchars_uni($userfield);

				$code = "<textarea name=\"profile_fields[$field]\" id=\"{$field}\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
}
else

				$code = "<textarea name=\"profile_fields[$field]\" id=\"{$field}\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
}
else

Zeile 670Zeile 698
			if($mybb->settings['dstcorrection'] == 1)
{
$enabledstcheck = "checked=\"checked\"";

			if($mybb->settings['dstcorrection'] == 1)
{
$enabledstcheck = "checked=\"checked\"";

			}

			}

			
}
// Spambot registration image thingy

			
}
// Spambot registration image thingy

Zeile 696Zeile 724
			$captcha_field = $mybb->settings['hiddencaptchaimagefield'];

eval("\$hiddencaptcha = \"".$templates->get("member_register_hiddencaptcha")."\";");

			$captcha_field = $mybb->settings['hiddencaptchaimagefield'];

eval("\$hiddencaptcha = \"".$templates->get("member_register_hiddencaptcha")."\";");

		}

		}

		if($mybb->settings['regtype'] != "randompass")
{
// JS validator extra

		if($mybb->settings['regtype'] != "randompass")
{
// JS validator extra

Zeile 748Zeile 776
	$plugins->run_hooks("member_activate_start");

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

	$plugins->run_hooks("member_activate_start");

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

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















	{
switch($mybb->settings['username'])
{
case 0:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
case 1:
$query = $db->simple_select("users", "*", "LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
case 2:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."' OR LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
default:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
}
$user = $db->fetch_array($query);

		if(!$user['username'])
{

		if(!$user['username'])
{

			error($lang->error_invalidpworusername);















			switch($mybb->settings['username_method'])
{
case 0:
error($lang->error_invalidpworusername);
break;
case 1:
error($lang->error_invalidpworusername1);
break;
case 2:
error($lang->error_invalidpworusername2);
break;
default:
error($lang->error_invalidpworusername);
break;
}

		}
$uid = $user['uid'];
}
else

		}
$uid = $user['uid'];
}
else

	{

	{

		$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
$user = $db->fetch_array($query);
}

		$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'");
$user = $db->fetch_array($query);
}

Zeile 768Zeile 824
		$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND (type='r' OR type='e')");
$activation = $db->fetch_array($query);
if(!$activation['uid'])

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

		{

		{

			error($lang->error_alreadyactivated);
}
if($activation['code'] != $mybb->input['code'])

			error($lang->error_alreadyactivated);
}
if($activation['code'] != $mybb->input['code'])

Zeile 777Zeile 833
		}
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')");
if($user['usergroup'] == 5 && $activation['type'] != "e")

		}
$db->delete_query("awaitingactivation", "uid='".$user['uid']."' AND (type='r' OR type='e')");
if($user['usergroup'] == 5 && $activation['type'] != "e")

		{

		{

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

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

		{

		{

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

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





			redirect("usercp.php", $lang->redirect_emailupdated);
}
else

			redirect("usercp.php", $lang->redirect_emailupdated);
}
else

Zeile 803Zeile 859

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


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

	}

	}

}

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

}

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

Zeile 866Zeile 922
				$email = $user['email'];
$activationcode = $user['code'];
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

				$email = $user['email'];
$activationcode = $user['code'];
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

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















				switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
case 1:
$emailmessage = $lang->sprintf($lang->email_activateaccount1, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
default:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
}

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

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

Zeile 908Zeile 978
				"dateline" => TIME_NOW,
"code" => $user['activationcode'],
"type" => "p"

				"dateline" => TIME_NOW,
"code" => $user['activationcode'],
"type" => "p"

			);

			);

			$db->insert_query("awaitingactivation", $awaitingarray);
$username = $user['username'];
$email = $user['email'];
$activationcode = $user['activationcode'];
$emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']);

			$db->insert_query("awaitingactivation", $awaitingarray);
$username = $user['username'];
$email = $user['email'];
$activationcode = $user['activationcode'];
$emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']);

			$emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);















			switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
case 1:
$emailmessage = $lang->sprintf($lang->email_lostpw1, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_lostpw2, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
default:
$emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
}

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

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

Zeile 929Zeile 1013

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


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

		$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");















		switch($mybb->settings['username_method'])
{
case 0:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
case 1:
$query = $db->simple_select("users", "*", "LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
case 2:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."' OR LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
default:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
}

		$user = $db->fetch_array($query);
if(!$user['uid'])
{

		$user = $db->fetch_array($query);
if(!$user['uid'])
{

			error($lang->error_invalidpworusername);















			switch($mybb->settings['username_method'])
{
case 0:
error($lang->error_invalidpworusername);
break;
case 1:
error($lang->error_invalidpworusername1);
break;
case 2:
error($lang->error_invalidpworusername2);
break;
default:
error($lang->error_invalidpworusername);
break;
}

		}
}
else

		}
}
else

Zeile 979Zeile 1091
	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;
break;
case 1:
$lang_username = $lang->username1;
break;
case 2:
$lang_username = $lang->username2;
break;
default:
$lang_username = $lang->username;
break;
}


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


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

Zeile 990Zeile 1118
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();

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

Zeile 998Zeile 1126
	
// 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 1007Zeile 1135
	if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);

	if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);

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















		switch($mybb->settings['username_method'])
{
case 0:
error($lang->error_invalidpworusername.$login_text);
break;
case 1:
error($lang->error_invalidpworusername1.$login_text);
break;
case 2:
error($lang->error_invalidpworusername2.$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']))."'", array('limit' => 1));

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

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

$errors = array();

Zeile 1029Zeile 1171
			$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}


			$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}


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















		switch($mybb->settings['username_method'])
{
case 0:
$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;
default:
$errors[] = $lang->error_invalidpworusername.$login_text;
break;
}

	}
else
{

	}
else
{

Zeile 1097Zeile 1253
		if($mybb->input['remember'] != "yes")
{
$remember = -1;

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

		}

		}

		else
{
$remember = null;

		else
{
$remember = null;

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

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

		}

		}

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

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

		}
}

		}
}

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

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

Zeile 1150Zeile 1306

// Redirect to the page where the user came from, but not if that was the login page.
if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)


// Redirect to the page where the user came from, but not if that was the login page.
if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)

	{

	{

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

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

	{

	{

		$redirect_url = '';
}


		$redirect_url = '';
}


Zeile 1176Zeile 1332
	$username = "";
$password = "";
if($mybb->input['username'] && $mybb->request_method == "post")

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

	{

	{

		$username = htmlspecialchars_uni($mybb->input['username']);
}

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

		$username = htmlspecialchars_uni($mybb->input['username']);
}

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

	}













	}

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

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

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

Zeile 1200Zeile 1367

// 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 1228Zeile 1395
if($mybb->input['action'] == "profile")
{
$plugins->run_hooks("member_profile_start");

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





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

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

Zeile 1279Zeile 1446
		else
{
$uid = $mybb->user['uid'];

		else
{
$uid = $mybb->user['uid'];

		}
}

		}
}

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

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

	{

	{

		$memprofile = $mybb->user;
}


		$memprofile = $mybb->user;
}


Zeile 1297Zeile 1464
	{
error($lang->error_nomember);
}

	{
error($lang->error_nomember);
}





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

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





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

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

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

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


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


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

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

	}
else

	}
else

	{
$lang->send_pm = '';

	{
$lang->send_pm = '';

	}

	}

	$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$lang->users_additional_info = $lang->sprintf($lang->users_additional_info, $memprofile['username']);
$lang->users_signature = $lang->sprintf($lang->users_signature, $memprofile['username']);

	$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$lang->users_additional_info = $lang->sprintf($lang->users_additional_info, $memprofile['username']);
$lang->users_signature = $lang->sprintf($lang->users_signature, $memprofile['username']);

Zeile 1333Zeile 1500
	else
{
$avatar = '';

	else
{
$avatar = '';

	}

	}





	if($memprofile['hideemail'] != 1)

	if($memprofile['hideemail'] != 1 && (my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false || $mybb->usergroup['cansendemailoverride'] != 0))

	{
eval("\$sendemail = \"".$templates->get("member_profile_email")."\";");
}
else

	{
eval("\$sendemail = \"".$templates->get("member_profile_email")."\";");
}
else

	{

	{

		$alttrow = "trow1"; // To properly sort the contact details below
$sendemail = '';

		$alttrow = "trow1"; // To properly sort the contact details below
$sendemail = '';

	}

	}


// Clean alt_trow for the contact details
$cat_array = array(


// Clean alt_trow for the contact details
$cat_array = array(

Zeile 1358Zeile 1525
	foreach($cat_array as $cat)
{
$bgcolors[$cat] = alt_trow();

	foreach($cat_array as $cat)
{
$bgcolors[$cat] = alt_trow();

	}


	}


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

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

Zeile 1377Zeile 1544
			"allow_mycode" => $mybb->settings['sigmycode'],
"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],

			"allow_mycode" => $mybb->settings['sigmycode'],
"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],

			"me_username" => $memprofile['username']


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

		);

$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser);

		);

$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser);

Zeile 1412Zeile 1580
	if($percent > 100)
{
$percent = 100;

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

	}

	}


if(!empty($memprofile['icq']))


if(!empty($memprofile['icq']))

	{

	{

		$memprofile['icq'] = intval($memprofile['icq']);
}
else

		$memprofile['icq'] = intval($memprofile['icq']);
}
else

Zeile 1429Zeile 1597
		$awaydate = my_date($mybb->settings['dateformat'], $memprofile['awaydate']);
if(!empty($memprofile['awayreason']))
{

		$awaydate = my_date($mybb->settings['dateformat'], $memprofile['awaydate']);
if(!empty($memprofile['awayreason']))
{

			$awayreason = htmlspecialchars_uni($memprofile['awayreason']);


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

Zeile 1450Zeile 1619
				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 1458Zeile 1627
			}

// If our away time has expired already, we should be back, right?

			}

// If our away time has expired already, we should be back, right?

			if ($returnmkdate < TIME_NOW)

			if($returnmkdate < TIME_NOW)

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

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

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

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

			}
}

			}
}

		
// Check if our away status is set to 1, it may have been updated already (see a few lines above)

		
// Check if our away status is set to 1, it may have been updated already (see a few lines above)

		if ($memprofile['away'] == 1)

		if($memprofile['away'] == 1)

		{
eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
}

		{
eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");
}

Zeile 1492Zeile 1661
		$memlastvisitdate = my_date($mybb->settings['dateformat'], $memprofile['lastactive']);
$memlastvisitsep = $lang->comma;
$memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);

		$memlastvisitdate = my_date($mybb->settings['dateformat'], $memprofile['lastactive']);
$memlastvisitsep = $lang->comma;
$memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);

	}

	}

	else
{
$memlastvisitdate = $lang->lastvisit_never;

	else
{
$memlastvisitdate = $lang->lastvisit_never;

Zeile 1544Zeile 1713
		else if($memprofile['birthdayprivacy'] == 'none')
{
$membday = $lang->birthdayhidden;

		else if($memprofile['birthdayprivacy'] == 'none')
{
$membday = $lang->birthdayhidden;

			$membdayage = '';
}
}
else

			$membdayage = '';
}
}
else

	{
$membday = $lang->not_specified;
$membdayage = '';

	{
$membday = $lang->not_specified;
$membdayage = '';

Zeile 1585Zeile 1754
	else
{
// No usergroup title so get a default one

	else
{
// No usergroup title so get a default one

		$query = $db->simple_select("usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC'));
while($title = $db->fetch_array($query))


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

if(is_array($usertitles))

		{

		{

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

			foreach($usertitles as $title)

			{

			{

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





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

break;
}

			}

			}

		}
}

		}
}

	
if($displaygroup['stars'] || $displaygroup['usertitle'])
{

	
if($displaygroup['stars'] || $displaygroup['usertitle'])
{

Zeile 1605Zeile 1779
	}
elseif(!$stars)
{

	}
elseif(!$stars)
{

		// This is for cases where the user has a title, but the group has no defined number of stars (use number of stars as per default usergroups)
$query = $db->simple_select("usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC'));
while($title = $db->fetch_array($query))

		if(!is_array($usertitles))



		{

		{

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







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

// This is for cases where the user has a title, but the group has no defined number of stars (use number of stars as per default usergroups)
if(is_array($usertitles))
{
foreach($usertitles as $title)

			{

			{

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




				if($memprofile['postnum'] >= $title['posts'])
{
$stars = $title['stars'];
$starimage = $title['starimage'];
break;
}

			}

			}

		}

		}

	}

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

	}

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

		{

		{

			$language = $mybb->user['language'];
}
else

			$language = $mybb->user['language'];
}
else

Zeile 1636Zeile 1817
	if(!$starimage)
{
$starimage = $displaygroup['starimage'];

	if(!$starimage)
{
$starimage = $displaygroup['starimage'];

	}


	}


	if($starimage)
{
// Only display stars if we have an image to use...

	if($starimage)
{
// Only display stars if we have an image to use...

Zeile 1713Zeile 1894
		{
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
{

		}
else
{

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

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

Zeile 1760Zeile 1941
		}
else
{

		}
else
{

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


			if($customfield['type'] == "textarea")

			if($customfield['type'] == "textarea")

			{

			{

				$customfieldval = nl2br(htmlspecialchars_uni($userfields[$field]));
}
else
{
$customfieldval = htmlspecialchars_uni($userfields[$field]);

				$customfieldval = nl2br(htmlspecialchars_uni($userfields[$field]));
}
else
{
$customfieldval = htmlspecialchars_uni($userfields[$field]);

			}

			}

		}

$customfield['name'] = htmlspecialchars_uni($customfield['name']);
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
$bgcolor = alt_trow();

		}

$customfield['name'] = htmlspecialchars_uni($customfield['name']);
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
$bgcolor = alt_trow();

	}

	}

	if($customfields)
{
eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");

	if($customfields)
{
eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");

Zeile 1784Zeile 1967
	if($memprofile['timeonline'] > 0)
{
$timeonline = nice_time($memprofile['timeonline']);

	if($memprofile['timeonline'] > 0)
{
$timeonline = nice_time($memprofile['timeonline']);

	}
else
{

	}
else
{

		$timeonline = $lang->none_registered;
}

if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
{
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");

		$timeonline = $lang->none_registered;
}

if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
{
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");

	}
else
{

	}
else
{

		$adminoptions = '';
}


		$adminoptions = '';
}


Zeile 1804Zeile 1987
		$memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));

if(!empty($memprofile['usernotes']))

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

if(!empty($memprofile['usernotes']))

		{

		{

			if(strlen($memprofile['usernotes']) > 100)
{
$memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100).'...';

			if(strlen($memprofile['usernotes']) > 100)
{
$memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100).'...';

Zeile 1816Zeile 1999
		}

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

		}

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

	}
else
{
$modoptions = '';
}

	}
else
{
$modoptions = '';
}

	
$buddy_options = '';


	
$buddy_options = '';


Zeile 1830Zeile 2013
		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>";

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

		}

		}

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

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

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

		}
}


		}
}


	$plugins->run_hooks("member_profile_end");

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

	$plugins->run_hooks("member_profile_end");

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

Zeile 1872Zeile 2055
		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count >= $mybb->usergroup['maxemails'])

		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count >= $mybb->usergroup['maxemails'])

		{

		{

			$lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']);
error($lang->error_max_emails_day);
}

			$lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']);
error($lang->error_max_emails_day);
}

Zeile 1948Zeile 2131

// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0 || !$mybb->user['uid'])


// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0 || !$mybb->user['uid'])

	{
error_no_permission();
}

	{
error_no_permission();
}

	
// Check group limits
if($mybb->usergroup['maxemails'] > 0)

	
// Check group limits
if($mybb->usergroup['maxemails'] > 0)

	{

	{

		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count > $mybb->usergroup['maxemails'])

		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count > $mybb->usergroup['maxemails'])

Zeile 1963Zeile 2146
			error($lang->error_max_emails_day);
}
}

			error($lang->error_max_emails_day);
}
}

	
$query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".intval($mybb->input['uid'])."'");

	
$query = $db->simple_select("users", "uid, username, email, hideemail, ignorelist", "uid='".intval($mybb->input['uid'])."'");

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

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

if(!$to_user['uid'])

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

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

if(!$to_user['uid'])

	{

	{

		error($lang->error_invaliduser);
}

if($to_user['hideemail'] != 0)
{
error($lang->error_hideemail);

		error($lang->error_invaliduser);
}

if($to_user['hideemail'] != 0)
{
error($lang->error_hideemail);

 
	}

if($to_user['ignorelist'] && (my_strpos(",".$to_user['ignorelist'].",", ",".$mybb->user['uid'].",") !== false && $mybb->usergroup['cansendemailoverride'] != 1))
{
error_no_permission();

	}

if(count($errors) > 0)

	}

if(count($errors) > 0)