Vergleich inc/functions_user.php - 1.2.0 - 1.2.3

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 50Zeile 50
function validate_password_from_username($username, $password)
{
global $db;

function validate_password_from_username($username, $password)
{
global $db;

	$query = $db->query("SELECT uid,username,password,salt,loginkey FROM ".TABLE_PREFIX."users WHERE username='".$db->escape_string($username)."' LIMIT 1");

	$query = $db->query("SELECT uid,username,password,salt,loginkey,remember FROM ".TABLE_PREFIX."users WHERE username='".$db->escape_string($username)."' LIMIT 1");

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

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

Zeile 508Zeile 508
{
global $db, $mybb;
static $pm_lastvisit_cache;

{
global $db, $mybb;
static $pm_lastvisit_cache;





	
$uid = intval($uid);


	// If no user id, assume that we mean the current logged in user.

	// If no user id, assume that we mean the current logged in user.

	if(intval($uid) == 0)

	if($uid == 0)

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

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

Zeile 525Zeile 527
	{
if(!$pm_lastvisit_cache[$uid])
{

	{
if(!$pm_lastvisit_cache[$uid])
{

			$query = $db->query("SELECT lastvisit FROM ".TABLE_PREFIX."users WHERE uid='".intval($uid)."'");

			$query = $db->query("SELECT lastvisit FROM ".TABLE_PREFIX."users WHERE uid='".$uid."'");

			$user = $db->fetch_array($query);
$pm_lastvisit_cache[$uid] = $user['lastvisit'];
}

			$user = $db->fetch_array($query);
$pm_lastvisit_cache[$uid] = $user['lastvisit'];
}

Zeile 541Zeile 543
	// Update number of new messages.
if($count_to_update & 2)
{

	// Update number of new messages.
if($count_to_update & 2)
{

		$query = $db->query("SELECT COUNT(pmid) AS pms_new FROM ".TABLE_PREFIX."privatemessages WHERE uid='".$uid."' AND dateline>'".$mybb->user['lastvisit']."' AND folder=1");

		$query = $db->query("SELECT COUNT(pmid) AS pms_new FROM ".TABLE_PREFIX."privatemessages WHERE uid='".$uid."' AND dateline>'".$lastvisit."' AND folder=1");

		$new = $db->fetch_array($query);
$pmcount['newpms'] = $new['pms_new'];

		$new = $db->fetch_array($query);
$pmcount['newpms'] = $new['pms_new'];

	}

	}

	// Update number of unread messages.
if($count_to_update & 4)
{

	// Update number of unread messages.
if($count_to_update & 4)
{

Zeile 554Zeile 556
	}
if(is_array($pmcount))
{

	}
if(is_array($pmcount))
{

		$db->update_query(TABLE_PREFIX."users", $pmcount, "uid='".intval($uid)."'");

		$db->update_query(TABLE_PREFIX."users", $pmcount, "uid='".$uid."'");

	}
return $pmcount;

	}
return $pmcount;

}

/**
* Return a list of banned usernames.
*
* @return array The array of banned usernames.
*/
function get_banned_usernames()
{
$bannedusernames = explode(",", $mybb->settings['bannedusernames']);
return $bannedusernames;

 
}

/**

}

/**