aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/auth
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/auth')
-rw-r--r--phpBB/includes/auth/auth_db.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php
index 925beb1645..42e1ac7c1f 100644
--- a/phpBB/includes/auth/auth_db.php
+++ b/phpBB/includes/auth/auth_db.php
@@ -28,10 +28,11 @@ function login_db(&$username, &$password)
FROM ' . USERS_TABLE . "
WHERE username = '" . $db->sql_escape($username) . "'";
$result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
- if ($row = $db->sql_fetchrow($result))
+ if ($row)
{
- $db->sql_freeresult($result);
if (md5($password) == $row['user_password'])
{
return ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) ? 0 : $row;