Vergleich member.php - 1.6.4 - 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 5465 2011-05-16 20:11:06Z jammerx2 $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

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

$nosession['avatar'] = 1;

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

$nosession['avatar'] = 1;

$templatelist = "member_register,error_nousername,error_nopassword,error_passwordmismatch,error_invalidemail,error_usernametaken,error_emailmismatch,error_noemail,redirect_registered";

$templatelist = "member_register,error_nousername,error_nopassword,error_passwordmismatch,error_invalidemail,error_usernametaken,error_emailmismatch,error_noemail,redirect_registered,member_register_hiddencaptcha";

$templatelist .= ",redirect_loggedout,login,redirect_loggedin,error_invalidusername,error_invalidpassword,member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_profile_modoptions,member_profile_signature,member_profile_groupimage,member_profile_referrals";
require_once "./global.php";


$templatelist .= ",redirect_loggedout,login,redirect_loggedin,error_invalidusername,error_invalidpassword,member_profile_email,member_profile_offline,member_profile_reputation,member_profile_warn,member_profile_warninglevel,member_profile_customfields_field,member_profile_customfields,member_profile_adminoptions,member_profile,member_login,member_profile_online,member_profile_modoptions,member_profile_signature,member_profile_groupimage,member_profile_referrals";
require_once "./global.php";


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

 

// If we have hidden CATPCHA enabled and it's filled, deny registration
if($mybb->settings['hiddencaptchaimage'])
{
$string = $mybb->settings['hiddencaptchaimagefield'];

if($mybb->input[$string] != '')
{
error($lang->error_spam_deny);
}
}


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


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

Zeile 150Zeile 161
	$errors = "";

if(!$userhandler->validate_user())

	$errors = "";

if(!$userhandler->validate_user())

	{

	{

		$errors = $userhandler->get_friendly_errors();
}

		$errors = $userhandler->get_friendly_errors();
}


if($mybb->settings['captchaimage'] == 1 && function_exists("imagecreatefrompng"))


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

	{

	{

		$imagehash = $db->escape_string($mybb->input['imagehash']);
$imagestring = $db->escape_string(my_strtolower($mybb->input['imagestring']));
$query = $db->simple_select("captcha", "*", "imagehash='$imagehash' AND LOWER(imagestring)='$imagestring'");
$imgcheck = $db->fetch_array($query);
if(!$imgcheck['dateline'])

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

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


		{

		{

			$errors[]  = $lang->error_regimageinvalid;





			// CAPTCHA validation failed
foreach($captcha->get_errors() as $error)
{
$errors[] = $error;
}

		}

		}

		$db->delete_query("captcha", "imagehash='$imagehash'");

 
	}

if(is_array($errors))

	}

if(is_array($errors))

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

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

		}

		}


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


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

		{

		{

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

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

		}


		}


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

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

Zeile 220Zeile 233
		if($mybb->input['dstcorrection'] == 2)
{
$dst_auto_selected = "selected=\"selected\"";

		if($mybb->input['dstcorrection'] == 2)
{
$dst_auto_selected = "selected=\"selected\"";

		}

		}

		else if($mybb->input['dstcorrection'] == 1)
{
$dst_enabled_selected = "selected=\"selected\"";

		else if($mybb->input['dstcorrection'] == 1)
{
$dst_enabled_selected = "selected=\"selected\"";

Zeile 228Zeile 241
		else
{
$dst_disabled_selected = "selected=\"selected\"";

		else
{
$dst_disabled_selected = "selected=\"selected\"";

		}

		}


$regerrors = inline_error($errors);
$mybb->input['action'] = "register";


$regerrors = inline_error($errors);
$mybb->input['action'] = "register";

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

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





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

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

Zeile 251Zeile 264
			my_unsetcookie("coppadob");
$plugins->run_hooks("member_do_register_end");
error($lang->redirect_registered_coppa_activate);

			my_unsetcookie("coppadob");
$plugins->run_hooks("member_do_register_end");
error($lang->redirect_registered_coppa_activate);

		}

		}

		else if($mybb->settings['regtype'] == "verify")
{
$activationcode = random_str();

		else if($mybb->settings['regtype'] == "verify")
{
$activationcode = random_str();

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

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

$plugins->run_hooks("member_do_register_end");

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

$plugins->run_hooks("member_do_register_end");

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

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

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

		$query = $db->simple_select("profilefields", "*", "required=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 661Zeile 702
			
}
// Spambot registration image thingy

			
}
// Spambot registration image thingy

		if($mybb->settings['captchaimage'] == 1 && function_exists("imagecreatefrompng"))

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

		{

		{

			$randomstr = random_str(5);
$imagehash = md5(random_str(12));
$regimagearray = array(
"imagehash" => $imagehash,
"imagestring" => $randomstr,
"dateline" => TIME_NOW
);
$db->insert_query("captcha", $regimagearray);
eval("\$regimage = \"".$templates->get("member_register_regimage")."\";");

			require_once MYBB_ROOT.'inc/class_captcha.php';
$captcha = new captcha(true, "member_register_regimage");












			// JS validator extra
$validator_extra .= "\tregValidator.register('imagestring', 'ajax', {url:'xmlhttp.php?action=validate_captcha', extra_body: 'imagehash', loading_message:'{$lang->js_validator_captcha_valid}', failure_message:'{$lang->js_validator_no_image_text}'});\n";
















			if($captcha->html)
{
$regimage = $captcha->html;

if($mybb->settings['captchaimage'] == 1)
{
// JS validator extra for our default CAPTCHA
$validator_extra .= "\tregValidator.register('imagestring', 'ajax', { url: 'xmlhttp.php?action=validate_captcha', extra_body: 'imagehash', loading_message: '{$lang->js_validator_captcha_valid}', failure_message: '{$lang->js_validator_no_image_text}'} );\n";
}
}
}
// Hidden CAPTCHA for Spambots
if($mybb->settings['hiddencaptchaimage'])
{
$captcha_field = $mybb->settings['hiddencaptchaimagefield'];

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

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

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

Zeile 708Zeile 757
			if($user['language'] == $lname)
{
$langoptions .= "<option value=\"$lname\" selected=\"selected\">$language</option>\n";

			if($user['language'] == $lname)
{
$langoptions .= "<option value=\"$lname\" selected=\"selected\">$language</option>\n";

			}

			}

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

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

Zeile 716Zeile 765
		}

$plugins->run_hooks("member_register_end");

		}

$plugins->run_hooks("member_register_end");





		eval("\$registration = \"".$templates->get("member_register")."\";");
output_page($registration);
}

		eval("\$registration = \"".$templates->get("member_register")."\";");
output_page($registration);
}

Zeile 728Zeile 777

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


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

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















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

		$user = $db->fetch_array($query);
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'];
}

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

Zeile 845Zeile 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);
}
}
$plugins->run_hooks("member_do_resendactivation_end");

				my_mail($email, $emailsubject, $emailmessage);
}
}
$plugins->run_hooks("member_do_resendactivation_end");





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

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

}

}


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


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

Zeile 864Zeile 955
}

if($mybb->input['action'] == "do_lostpw" && $mybb->request_method == "post")

}

if($mybb->input['action'] == "do_lostpw" && $mybb->request_method == "post")

{

{

	$plugins->run_hooks("member_do_lostpw_start");

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

	$plugins->run_hooks("member_do_lostpw_start");

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

Zeile 893Zeile 984
			$email = $user['email'];
$activationcode = $user['activationcode'];
$emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']);

			$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 908Zeile 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 933Zeile 1066
		$username = $user['username'];

// Generate a new password, then update it

		$username = $user['username'];

// Generate a new password, then update it

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








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

if($password_length < 8)
{
$password_length = 8;
}

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


$email = $user['email'];


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

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





		$plugins->run_hooks("member_resetpassword_reset");

error($lang->redirect_passwordreset);

		$plugins->run_hooks("member_resetpassword_reset");

error($lang->redirect_passwordreset);

Zeile 951Zeile 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 979Zeile 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 1001Zeile 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 1156Zeile 1340
	{
$password = htmlspecialchars_uni($mybb->input['password']);
}

	{
$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 1279Zeile 1474
	$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->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']);
}

Zeile 1307Zeile 1502
		$avatar = '';
}


		$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")."\";");
}

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

Zeile 1349Zeile 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 1401Zeile 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
{

		}
else
{

Zeile 1414Zeile 1611
		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)
{
require_once MYBB_ROOT."inc/functions_time.php";

			if($returnhome[2] >= 2038)
{
require_once MYBB_ROOT."inc/functions_time.php";

Zeile 1425Zeile 1625
				$returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);
$returndate = my_date($mybb->settings['dateformat'], $returnmkdate);
}

				$returnmkdate = mktime(0, 0, 0, $returnhome[1], $returnhome[0], $returnhome[2]);
$returndate = my_date($mybb->settings['dateformat'], $returnmkdate);
}

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

// 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)
if($memprofile['away'] == 1)
{
eval("\$awaybit = \"".$templates->get("member_profile_away")."\";");

		}

		}

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

 
	}
if($memprofile['dst'] == 1)
{

	}
if($memprofile['dst'] == 1)
{

Zeile 1435Zeile 1649
		{
$memprofile['timezone'] = "+{$memprofile['timezone']}";
}

		{
$memprofile['timezone'] = "+{$memprofile['timezone']}";
}

	}

	}

	$memregdate = my_date($mybb->settings['dateformat'], $memprofile['regdate']);
$memlocaldate = gmdate($mybb->settings['dateformat'], TIME_NOW + ($memprofile['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], TIME_NOW + ($memprofile['timezone'] * 3600));

	$memregdate = my_date($mybb->settings['dateformat'], $memprofile['regdate']);
$memlocaldate = gmdate($mybb->settings['dateformat'], TIME_NOW + ($memprofile['timezone'] * 3600));
$memlocaltime = gmdate($mybb->settings['timeformat'], TIME_NOW + ($memprofile['timezone'] * 3600));

Zeile 1449Zeile 1663
		$memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
}
else

		$memlastvisittime = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);
}
else

	{

	{

		$memlastvisitdate = $lang->lastvisit_never;
$memlastvisitsep = '';
$memlastvisittime = '';

		$memlastvisitdate = $lang->lastvisit_never;
$memlastvisitsep = '';
$memlastvisittime = '';

Zeile 1469Zeile 1683
				{
$w_day = date("l", mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]));
$membday = format_bdays($mybb->settings['dateformat'], $membday[1], $membday[0], $membday[2], $w_day);

				{
$w_day = date("l", mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]));
$membday = format_bdays($mybb->settings['dateformat'], $membday[1], $membday[0], $membday[2], $w_day);

				}

				}

				else
{
$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);

				else
{
$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);

Zeile 1500Zeile 1714
		{
$membday = $lang->birthdayhidden;
$membdayage = '';

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

		}
}
else

		}
}
else

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

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

Zeile 1540Zeile 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;
}

			}
}
}

			}
}
}

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

	}
elseif(!$stars)
{

 
		if(!is_array($usertitles))
{
$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)

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

			foreach($usertitles as $title)

			{

			{

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




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

			}
}
}

			}
}
}

Zeile 1641Zeile 1867
	}

// Fetch the reputation for this user

	}

// Fetch the reputation for this user

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

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

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

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

Zeile 1715Zeile 1941
		}
else
{

		}
else
{

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


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

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

Zeile 1768Zeile 1996
		else
{
$memprofile['usernotes'] = $lang->no_usernotes;

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

		}


		}


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

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

	{

	{

		$modoptions = '';
}

		$modoptions = '';
}

	

	

	$buddy_options = '';

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

	$buddy_options = '';

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

		{

		{

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

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

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

		}
else

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

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

Zeile 1814Zeile 2042
	verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("member_do_emailuser_start");

	verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("member_do_emailuser_start");


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

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


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

// 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 1837Zeile 2065
	$to_user = $db->fetch_array($query);

if(!$to_user['username'])

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

if(!$to_user['username'])

	{

	{

		error($lang->error_invalidusername);

		error($lang->error_invalidusername);

	}


	}


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

if(empty($mybb->input['subject']))

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

if(empty($mybb->input['subject']))

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


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


	if(empty($mybb->input['message']))
{
$errors[] = $lang->error_no_email_message;

	if(empty($mybb->input['message']))
{
$errors[] = $lang->error_no_email_message;

Zeile 1903Zeile 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

	}

// Check group limits

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

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

	

	

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

if(!$to_user['uid'])

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