From b0c3e3958220c04cbb4f25f0c24b53b65a34e360 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 16 Jun 2006 16:54:51 +0000 Subject: - removed db cache (might re-appear, but for now we do not see the need for it) - all changes to styles/subsilver/template are purely cosmetic (no functional changes) - cosmetics - bugfixes - add index to modules table - use modules ordering code for forums too git-svn-id: file:///svn/phpbb/trunk@6073 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/auth/auth_db.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/auth/auth_db.php') diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 071b61fdfe..55465ab762 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -103,7 +103,10 @@ function login_db(&$username, &$password) if (md5($password) == $row['user_password']) { // Successful, reset login attempts (the user passed all stages) - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_attempts = 0 WHERE user_id = ' . $row['user_id']); + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_login_attempts = 0 + WHERE user_id = ' . $row['user_id']; + $db->sql_query($sql); // User inactive... if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) @@ -124,8 +127,11 @@ function login_db(&$username, &$password) } // Password incorrect - increase login attempts - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_attempts = user_login_attempts + 1 WHERE user_id = ' . $row['user_id']); - + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_login_attempts = user_login_attempts + 1 + WHERE user_id = ' . $row['user_id']; + $db->sql_query($sql); + // Give status about wrong password... return array( 'status' => LOGIN_ERROR_PASSWORD, -- cgit v1.2.1