diff options
Diffstat (limited to 'phpBB/includes/auth/auth_db.php')
-rw-r--r-- | phpBB/includes/auth/auth_db.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index a4a6c8d268..071b61fdfe 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -71,15 +71,7 @@ function login_db(&$username, &$password) if ($confirm_row) { - if (strcasecmp($confirm_row['code'], $confirm_code) == 0) - { - return array( - 'status' => LOGIN_ERROR_ATTEMPTS, - 'error_msg' => 'CONFIRM_CODE_WRONG', - 'user_row' => $row, - ); - } - else + if (strcasecmp($confirm_row['code'], $confirm_code) === 0) { $sql = 'DELETE FROM ' . CONFIRM_TABLE . " WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "' @@ -87,6 +79,14 @@ function login_db(&$username, &$password) AND confirm_type = " . CONFIRM_LOGIN; $db->sql_query($sql); } + else + { + return array( + 'status' => LOGIN_ERROR_ATTEMPTS, + 'error_msg' => 'CONFIRM_CODE_WRONG', + 'user_row' => $row, + ); + } } else { |