From: Jakub Vrana Date: Sat, 8 Feb 2014 03:35:26 +0000 (-0800) Subject: Allow using in ->login() (bug #381) X-Git-Tag: v4.1.0~49 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=150301ed5f7c15ac7edf329c9a7101b5c4497acd;p=adminer.git Allow using in ->login() (bug #381) --- 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 }