1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Create user on the same domain by default

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@750 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-06-22 06:11:15 +00:00
parent 97807b0f9f
commit 409f968295
3 changed files with 3 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ if ($_POST) {
$row = $_POST;
$grants = $new_grants;
} else {
$row = $_GET + array("host" => "localhost"); // create user on localhost by default
$row = $_GET + array("host" => $dbh->result($dbh->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', -1)"))); // create user on the same domain by default
$row["pass"] = $old_pass;
if (strlen($old_pass)) {
$row["hashed"] = true;