aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/auth/auth_db.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-02-03 20:59:39 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-02-03 20:59:39 +0000
commitbd30d226a583276f627d844fca46a7645dcce4fd (patch)
tree40e85c7a434d3789d1d3dace8831e18ce70a5c97 /phpBB/includes/auth/auth_db.php
parentdd865bb517bb6c3f5ff1da910d4ed3ab19e650b0 (diff)
downloadforums-bd30d226a583276f627d844fca46a7645dcce4fd.tar
forums-bd30d226a583276f627d844fca46a7645dcce4fd.tar.gz
forums-bd30d226a583276f627d844fca46a7645dcce4fd.tar.bz2
forums-bd30d226a583276f627d844fca46a7645dcce4fd.tar.xz
forums-bd30d226a583276f627d844fca46a7645dcce4fd.zip
- ability to change anonymous user settings more easily
- fix serious bugs in permissions (always allowing if permissions explicitly set and getting wrong permission options from bitfield) - added option for returning an array to make_forum_select - again fixing bugs in module system (one for a very query consuming part and one for correctly filling the cache) git-svn-id: file:///svn/phpbb/trunk@5517 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/auth/auth_db.php')
-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;