Zeile 112 | Zeile 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 574 | Zeile 574 |
---|
if($title['posts'] <= $user['postnum']) { $usertitle = $title;
|
if($title['posts'] <= $user['postnum']) { $usertitle = $title;
|
| break;
|
} }
| } }
|
Zeile 666 | Zeile 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;
|
Zeile 679 | Zeile 681 |
---|
else { $order_by = 'RAND()';
|
else { $order_by = 'RAND()';
|
| } if($old_qid) { $excl_old = ' AND qid != '.(int)$old_qid;
|
}
|
}
|
$query = $db->simple_select('questions', 'qid, shown', 'active=1', array('limit' => 1, 'order_by' => $order_by));
| $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))
|