From 150301ed5f7c15ac7edf329c9a7101b5c4497acd Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 7 Feb 2014 19:35:26 -0800 Subject: [PATCH] Allow using in ->login() (bug #381) --- adminer/include/auth.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php index f46030ed..5edd0abc 100644 --- a/adminer/include/auth.inc.php +++ b/adminer/include/auth.inc.php @@ -137,13 +137,13 @@ if (isset($_GET["username"])) { $connection = connect(); } +$driver = new Min_Driver($connection); + if (!is_object($connection) || !$adminer->login($_GET["username"], get_password())) { auth_error(); exit; } -$driver = new Min_Driver($connection); - if ($auth && $_POST["token"]) { $_POST["token"] = $token; // reset token after explicit login }