Vergleich member.php - 1.4.4 - 1.4.6

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * 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 4274 2008-11-19 03:22:50Z Tikitiki $

 * $Id: member.php 4304 2009-01-02 01:11:56Z chris $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

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 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);
}
if($mybb->input['code'] && $user['uid'])
{

	}
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";
$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND (type='r' OR type='e')");
$activation = $db->fetch_array($query);

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

Zeile 751Zeile 756
		if($user['usergroup'] == 5 && $activation['type'] != "e")
{
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");

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

		}

		}

		if($activation['type'] == "e")
{
$newemail = array(

		if($activation['type'] == "e")
{
$newemail = array(

Zeile 759Zeile 764
				);
$db->update_query("users", $newemail, "uid='".$user['uid']."'");
$plugins->run_hooks("member_activate_emailupdated");

				);
$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 775Zeile 780

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


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

	}

	}

}

}





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

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


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


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

		error($lang->error_activated_by_admin);
}


		error($lang->error_activated_by_admin);
}


Zeile 798Zeile 803
	if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);

	if($mybb->settings['regtype'] == "admin")
{
error($lang->error_activated_by_admin);

	}


	}


	$query = $db->query("
SELECT u.uid, u.username, u.usergroup, u.email, a.code
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND a.type='r')
WHERE u.email='".$db->escape_string($mybb->input['email'])."'
");

	$query = $db->query("
SELECT u.uid, u.username, u.usergroup, u.email, a.code
FROM ".TABLE_PREFIX."users u
LEFT JOIN ".TABLE_PREFIX."awaitingactivation a ON (a.uid=u.uid AND a.type='r')
WHERE u.email='".$db->escape_string($mybb->input['email'])."'
");

	$numusers = $db->num_rows($query);
if($numusers < 1)

	$numusers = $db->num_rows($query);
if($numusers < 1)

	{
error($lang->error_invalidemail);
}

	{
error($lang->error_invalidemail);
}

Zeile 839Zeile 844
			}
}
$plugins->run_hooks("member_do_resendactivation_end");

			}
}
$plugins->run_hooks("member_do_resendactivation_end");





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

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





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

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





	eval("\$lostpw = \"".$templates->get("member_lostpw")."\";");
output_page($lostpw);
}

	eval("\$lostpw = \"".$templates->get("member_lostpw")."\";");
output_page($lostpw);
}

Zeile 862Zeile 867
	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 884Zeile 889
			$emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']);
$emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
my_mail($email, $emailsubject, $emailmessage);

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

		}
}

		}
}

	$plugins->run_hooks("member_do_lostpw_end");

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

	$plugins->run_hooks("member_do_lostpw_end");

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

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

$email = $user['email'];

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

$email = $user['email'];





		$plugins->run_hooks("member_resetpassword_process");

$emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']);

		$plugins->run_hooks("member_resetpassword_process");

$emailsubject = $lang->sprintf($lang->emailsubject_passwordreset, $mybb->settings['bbname']);

Zeile 1053Zeile 1058
		$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

$db->update_query("users", array("loginattempts" => 1), "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'];

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

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

	

	

		$plugins->run_hooks("member_do_login_end");

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

		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)

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

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

		}

		}

	}
else
{

	}
else
{

Zeile 1109Zeile 1114
		$redirect_url = htmlentities($mybb->input['url']);
}
elseif($_SERVER['HTTP_REFERER'])

		$redirect_url = htmlentities($mybb->input['url']);
}
elseif($_SERVER['HTTP_REFERER'])

	{

	{

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

$captcha = "";
// Show captcha image for guests if enabled
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && $do_captcha == true)

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

$captcha = "";
// Show captcha image for guests if enabled
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && $do_captcha == true)

	{
if(!$correct)
{
$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")."\";");
}

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

	}

$username = "";

Zeile 1554Zeile 1556
	
// 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']);