Vergleich member.php - 1.4.2 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.4

<?php
/**
* MyBB 1.4

 * Copyright � 2008 MyBB Group, All Rights Reserved

 * Copyright © 2008 MyBB Group, All Rights Reserved

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 *
* Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: member.php 4154 2008-08-30 06:06:59Z Tikitiki $

 * $Id: member.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 14Zeile 14

$nosession['avatar'] = 1;
$templatelist = "member_register,error_nousername,error_nopassword,error_passwordmismatch,error_invalidemail,error_usernametaken,error_emailmismatch,error_noemail,redirect_registered";


$nosession['avatar'] = 1;
$templatelist = "member_register,error_nousername,error_nopassword,error_passwordmismatch,error_invalidemail,error_usernametaken,error_emailmismatch,error_noemail,redirect_registered";

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

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

require_once "./global.php";

require_once MYBB_ROOT."inc/functions_post.php";

require_once "./global.php";

require_once MYBB_ROOT."inc/functions_post.php";

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

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

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

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

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

Zeile 610Zeile 610
			else
{
$value = htmlspecialchars_uni($userfield);

			else
{
$value = htmlspecialchars_uni($userfield);

				$code = "<input type=\"text\" name=\"profile_fields[$field]\" id=\"{$field}\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";






				$maxlength = "";
if($profilefield['maxlength'] > 0)
{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}
$code = "<input type=\"text\" name=\"profile_fields[$field]\" id=\"{$field}\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";

			}
if($profilefield['required'] == 1)
{

			}
if($profilefield['required'] == 1)
{

Zeile 638Zeile 643
		if($requiredfields)
{
eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";");

		if($requiredfields)
{
eval("\$requiredfields = \"".$templates->get("member_register_requiredfields")."\";");

		}

		}

		if(!$fromreg)
{
$allownoticescheck = "checked=\"checked\"";

		if(!$fromreg)
{
$allownoticescheck = "checked=\"checked\"";

Zeile 653Zeile 658
				$enabledstcheck = "checked=\"checked\"";
}


				$enabledstcheck = "checked=\"checked\"";
}


		}

		}

		// Spambot registration image thingy
if($mybb->settings['captchaimage'] == 1 && function_exists("imagecreatefrompng"))
{

		// Spambot registration image thingy
if($mybb->settings['captchaimage'] == 1 && function_exists("imagecreatefrompng"))
{

Zeile 728Zeile 733
			error($lang->error_invalidpworusername);
}
$uid = $user['uid'];

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

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

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

	if($mybb->input['code'] && $user['uid'])
{
$mybb->settings['awaitingusergroup'] = "5";

	if($mybb->input['code'] && $user['uid'])
{
$mybb->settings['awaitingusergroup'] = "5";

Zeile 749Zeile 754
		}
$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")

Zeile 779Zeile 784
}

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

}

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

{

{

	$plugins->run_hooks("member_resendactivation");

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

	$plugins->run_hooks("member_resendactivation");

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

Zeile 790Zeile 795
	eval("\$activate = \"".$templates->get("member_resendactivation")."\";");
output_page($activate);
}

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





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

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

{
$plugins->run_hooks("member_do_resendactivation_start");


{
$plugins->run_hooks("member_do_resendactivation_start");


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

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

	{

	{

		error($lang->error_activated_by_admin);
}


		error($lang->error_activated_by_admin);
}


Zeile 810Zeile 815
	if($numusers < 1)
{
error($lang->error_invalidemail);

	if($numusers < 1)
{
error($lang->error_invalidemail);

	}

	}

	else
{
while($user = $db->fetch_array($query))

	else
{
while($user = $db->fetch_array($query))

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

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





	$email = $db->escape_string($email);
$query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->input['email'])."'");
$numusers = $db->num_rows($query);

	$email = $db->escape_string($email);
$query = $db->simple_select("users", "*", "email='".$db->escape_string($mybb->input['email'])."'");
$numusers = $db->num_rows($query);

Zeile 902Zeile 907
		if(!$user['uid'])
{
error($lang->error_invalidpworusername);

		if(!$user['uid'])
{
error($lang->error_invalidpworusername);

		}

		}

	}
else
{

	}
else
{

Zeile 917Zeile 922
		if($activation['code'] != $mybb->input['code'])
{
error($lang->error_badlostpwcode);

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

		}

		}

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


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


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


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


		$plugins->run_hooks("member_resetpassword_reset");


		$plugins->run_hooks("member_resetpassword_reset");


		error($lang->redirect_passwordreset);

		error($lang->redirect_passwordreset);

	}
else
{

	}
else
{

		$plugins->run_hooks("member_resetpassword_form");

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

		$plugins->run_hooks("member_resetpassword_form");

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

 
}

$do_captcha = $correct = false;
$inline_errors = "";
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();
$login_text = '';

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

if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);
error($lang->error_invalidpworusername.$login_text);
}

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

$errors = array();

$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])
{
my_setcookie('loginattempts', $logins + 1);
$db->write_query("UPDATE ".TABLE_PREFIX."users SET loginattempts=loginattempts+1 WHERE LOWER(username) = '".$db->escape_string(my_strtolower($mybb->input['username']))."'");

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

if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}

$errors[] = $lang->error_invalidpworusername.$login_text;
}
else
{
$correct = true;
}

if($loginattempts > 3 || intval($mybb->cookies['loginattempts']) > 3)
{
// Show captcha image for guests if enabled
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && !$mybb->user['uid'])
{
// If previewing a post - check their current captcha input - if correct, hide the captcha input area
if($mybb->input['imagestring'])
{
$imagehash = $db->escape_string($mybb->input['imagehash']);
$imagestring = $db->escape_string($mybb->input['imagestring']);
$query = $db->simple_select("captcha", "*", "imagehash='{$imagehash}' AND imagestring='{$imagestring}'");
$imgcheck = $db->fetch_array($query);
if($imgcheck['dateline'] > 0)
{
$correct = true;
}
else
{
$db->delete_query("captcha", "imagehash='{$imagehash}'");
$errors[] = $lang->error_regimageinvalid;
}
}
else if($mybb->input['quick_login'] == 1 && $mybb->input['quick_password'] && $mybb->input['quick_username'])
{
$errors[] = $lang->error_regimagerequired;
}
else
{
$errors[] = $lang->error_regimagerequired;
}
}

$do_captcha = true;
}

if(!empty($errors))
{
$mybb->input['action'] = "login";
$mybb->input['request_method'] = "get";

$inline_errors = inline_error($errors);
}
else if($correct)
{
if($user['coppauser'])
{
error($lang->error_awaitingcoppa);
}

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

$db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");

// Temporarily set the cookie remember option for the login cookies
$mybb->user['remember'] = $user['remember'];

my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], null, true);
my_setcookie("sid", $session->sid, -1, true);

$plugins->run_hooks("member_do_login_end");

if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)
{
if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false)
{
$mybb->input['url'] = str_replace('&processed=1', '', $mybb->input['url']);
}

$mybb->input['url'] = str_replace('&amp;', '&', $mybb->input['url']);

// 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
{
$mybb->input['action'] = "login";
$mybb->input['request_method'] = "get";
}

$plugins->run_hooks("member_do_login_end");

}

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

}

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

Zeile 962Zeile 1109
	login_attempt_check();

// Redirect to the page where the user came from, but not if that was the login page.

	login_attempt_check();

// Redirect to the page where the user came from, but not if that was the login page.

	if($mybb->input['url'] && !preg_match("/action=login/i", $mybb->input['url']))

	if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)

	{

	{

		$redirect_url = htmlentities($mybb->input['url']);
































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

$captcha = "";
// Show captcha image for guests if enabled
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && $do_captcha == true)
{
$randomstr = random_str(5);
$imagehash = md5(random_str(12));
$imagearray = array(
"imagehash" => $imagehash,
"imagestring" => $randomstr,
"dateline" => TIME_NOW
);
$db->insert_query("captcha", $imagearray);
eval("\$captcha = \"".$templates->get("post_captcha")."\";");
}

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

	}

	}

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








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

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

}

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

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

if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);
$db->write_query("UPDATE ".TABLE_PREFIX."sessions SET loginattempts=loginattempts+1 WHERE sid = '{$session->sid}'");
if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidpworusername.$login_text);
}
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);
if(!$user['uid'])
{
my_setcookie('loginattempts', $logins + 1);
$db->write_query("UPDATE ".TABLE_PREFIX."sessions SET loginattempts=loginattempts+1 WHERE sid = '{$session->sid}'");
if($mybb->settings['failedlogintext'] == 1)
{
$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);
}
error($lang->error_invalidpassword.$login_text);
}

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

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

// Temporarily set the cookie remember option for the login cookies
$mybb->user['remember'] = $user['remember'];

my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], null, true);
my_setcookie("sid", $session->sid, -1, true);

$plugins->run_hooks("member_do_login_end");

if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)
{
if((my_strpos(basename($mybb->input['url']), 'newthread.php') !== false || my_strpos(basename($mybb->input['url']), 'newreply.php') !== false) && my_strpos($mybb->input['url'], '&processed=1') !== false)
{
$mybb->input['url'] = str_replace('&processed=1', '', $mybb->input['url']);
}

$mybb->input['url'] = str_replace('&amp;', '&', $mybb->input['url']);

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

 
}

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

}

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

Zeile 1206Zeile 1303
	}
else
{

	}
else
{

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

		$sendemail = '';

		$sendemail = '';

 
	}

// Clean alt_trow for the contact details
$cat_array = array(
"pm",
"icq",
"aim",
"yahoo",
"msn",
);

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

	}

if($memprofile['website'])

	}

if($memprofile['website'])

Zeile 1256Zeile 1369
	{
$percent = 100;
}

	{
$percent = 100;
}


$query = $db->simple_select("users", "COUNT(uid) AS referrals", "referrer='{$memprofile['uid']}'");
$referrals = $db->fetch_field($query, "referrals");

 

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


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

Zeile 1274Zeile 1384
		$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$awaydate = my_date($mybb->settings['dateformat'], $memprofile['awaydate']);
if(!empty($memprofile['awayreason']))

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

		{

		{

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

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

Zeile 1374Zeile 1484
	{
$membday = $lang->not_specified;
$membdayage = '';

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

	}

	}

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

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

	}











	}

// Grab the following fields from the user's displaygroup
$displaygroupfields = array(
"title",
"usertitle",
"stars",
"starimage",
"image",
"usereputationsystem"
);

	$displaygroup = usergroup_displaygroup($memprofile['displaygroup']);

// Get the user title for this user

	$displaygroup = usergroup_displaygroup($memprofile['displaygroup']);

// Get the user title for this user

 
	unset($usertitle);
unset($stars);

	if(trim($memprofile['usertitle']) != '')
{
// User has custom user title

	if(trim($memprofile['usertitle']) != '')
{
// User has custom user title

Zeile 1392Zeile 1514
	{
// User has group title
$usertitle = $displaygroup['usertitle'];

	{
// User has group title
$usertitle = $displaygroup['usertitle'];

	}

	}

	else

	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))
{
if($memprofile['postnum'] >= $title['posts'])
{

		// 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))
{
if($memprofile['postnum'] >= $title['posts'])
{

				$usertitle = $title['title'];





















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

if($displaygroup['stars'] || $displaygroup['usertitle'])
{
// Set the number of stars if display group has constant number of stars
$stars = $displaygroup['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($memprofile['postnum'] >= $title['posts'])
{

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

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

	}

if($displaygroup['stars'])
{
$stars = $displaygroup['stars'];

 
	}

if(!empty($displaygroup['image']))

	}

if(!empty($displaygroup['image']))

Zeile 1442Zeile 1579
	
// User is currently online and this user has permissions to view the user on the WOL
$timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;

	
// User is currently online and this user has permissions to view the user on the WOL
$timesearch = TIME_NOW - $mybb->settings['wolcutoffmins']*60;

	$query = $db->simple_select("sessions", "location", "uid='$uid' AND time>'{$timesearch}'", array('order_by' => 'time', 'order_dir' => 'DESC', 'limit' => 1));
$location = $db->fetch_field($query, 'location');

	$query = $db->simple_select("sessions", "location,nopermission", "uid='$uid' AND time>'{$timesearch}'", array('order_by' => 'time', 'order_dir' => 'DESC', 'limit' => 1));
$session = $db->fetch_array($query);

	

	

	if(($memprofile['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $memprofile['uid'] == $mybb->user['uid']) && $location)

	if(($memprofile['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $memprofile['uid'] == $mybb->user['uid']) && !empty($session))

	{
// Fetch their current location
$lang->load("online");
require_once MYBB_ROOT."inc/functions_online.php";

	{
// Fetch their current location
$lang->load("online");
require_once MYBB_ROOT."inc/functions_online.php";

		$activity = fetch_wol_activity($location);

		$activity = fetch_wol_activity($session['location'], $session['nopermission']);

		$location = build_friendly_wol_location($activity);
$location_time = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);


		$location = build_friendly_wol_location($activity);
$location_time = my_date($mybb->settings['timeformat'], $memprofile['lastactive']);


Zeile 1463Zeile 1600
	}

// Fetch the reputation for this user

	}

// Fetch the reputation for this user

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

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

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


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


Zeile 1500Zeile 1637
	$userfields = $db->fetch_array($query);
$customfields = '';
$bgcolor = "trow1";

	$userfields = $db->fetch_array($query);
$customfields = '';
$bgcolor = "trow1";

 
	$alttrow = "trow1";

	// If this user is an Administrator or a Moderator then we wish to show all profile fields

	// If this user is an Administrator or a Moderator then we wish to show all profile fields

	if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['gid'] == 6)

	if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['canmodcp'] == 1)

	{
$field_hidden = '1=1';
}

	{
$field_hidden = '1=1';
}

Zeile 1570Zeile 1708
	{
$modoptions = '';
}

	{
$modoptions = '';
}

	



	$plugins->run_hooks("member_profile_end");

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

	$plugins->run_hooks("member_profile_end");

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





if($mybb->input['action'] == "do_emailuser" && $mybb->request_method == "post")
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("member_do_emailuser_start");

if($mybb->input['action'] == "do_emailuser" && $mybb->request_method == "post")
{
// Verify incoming POST request
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'])
{

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

Zeile 1595Zeile 1733
	{
$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");

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

		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 1627Zeile 1765

if(count($errors) == 0)
{


if(count($errors) == 0)
{

		$from = "{$mybb->user['username']} <{$mybb->user['email']}>";








		if($mybb->settings['mail_handler'] == 'smtp')
{
$from = $mybb->user['email'];
}
else
{
$from = "{$mybb->user['username']} <{$mybb->user['email']}>";
}

		
$message = $lang->sprintf($lang->email_emailuser, $to_user['username'], $mybb->user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->input['message']);

		
$message = $lang->sprintf($lang->email_emailuser, $to_user['username'], $mybb->user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->input['message']);

		my_mail($to_user['email'], $mybb->input['subject'], $message, $from);

		my_mail($to_user['email'], $mybb->input['subject'], $message, $from, "", "", false, "text", "", $mybb->user['email']);

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

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