]> git.joonet.de Git - adminer.git/commitdiff
Don't overwrite privileges for existing users
authorJakub Vrana <jakub@vrana.cz>
Fri, 3 Jun 2011 12:02:19 +0000 (14:02 +0200)
committerJakub Vrana <jakub@vrana.cz>
Fri, 3 Jun 2011 12:02:19 +0000 (14:02 +0200)
adminer/user.inc.php

index 38a3b505f2b2d6bdd7d6099b62102e187e15bb62..ef8f41f203c7603cb7c4470dbab911ccfb2a641e 100644 (file)
@@ -111,7 +111,7 @@ if ($_POST) {
        if ($old_pass != "") {
                $row["hashed"] = true;
        }
-       $grants[$_GET["db"] != "" ? idf_escape($_GET["db"]) . ".*" : ""] = true;
+       $grants[$_GET["db"] != "" && $_GET["user"] == "" ? idf_escape($_GET["db"]) . ".*" : ""] = array();
 }
 
 ?>