]> git.joonet.de Git - adminer.git/commitdiff
Allow using in ->login() (bug #381)
authorJakub Vrana <jakub@vrana.cz>
Sat, 8 Feb 2014 03:35:26 +0000 (19:35 -0800)
committerJakub Vrana <jakub@vrana.cz>
Sat, 8 Feb 2014 03:35:26 +0000 (19:35 -0800)
adminer/include/auth.inc.php

index f46030eda2ac8e1c19b410809cdd6a36c2198d44..5edd0abcd7d3a82c969e32a977ea059c5329f0e2 100644 (file)
@@ -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
 }