Vergleich inc/functions_user.php - 1.8.0 - 1.8.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 112Zeile 112
		);
$db->update_query("users", $sql_array, "uid = ".$user['uid']);
}

		);
$db->update_query("users", $sql_array, "uid = ".$user['uid']);
}

	if(salt_password(md5($password), $user['salt']) == $user['password'])

	if(salt_password(md5($password), $user['salt']) === $user['password'])

	{
return $user;
}

	{
return $user;
}

Zeile 574Zeile 574
			if($title['posts'] <= $user['postnum'])
{
$usertitle = $title;

			if($title['posts'] <= $user['postnum'])
{
$usertitle = $title;

 
				break;

			}
}


			}
}


Zeile 666Zeile 667
/**
* Generates a security question for registration.
*

/**
* Generates a security question for registration.
*

 
 * @param int Optional ID of the old question.

 * @return string The question session id.
*/

 * @return string The question session id.
*/

function generate_question()

function generate_question($old_qid=0)

{
global $db;


{
global $db;


	$query = $db->query("
SELECT qid, shown
FROM ".TABLE_PREFIX."questions
WHERE active='1'
ORDER BY RAND()
LIMIT 1
");









	if($db->type == 'pgsql' || $db->type == 'sqlite')
{
$order_by = 'RANDOM()';
}
else
{
$order_by = 'RAND()';
}

if($old_qid)
{
$excl_old = ' AND qid != '.(int)$old_qid;
}

$query = $db->simple_select('questions', 'qid, shown', "active=1{$excl_old}", array('limit' => 1, 'order_by' => $order_by));

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

if(!$db->num_rows($query))

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

if(!$db->num_rows($query))