mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 00:28:34 +02:00
Add helper function
This commit is contained in:
@@ -56,7 +56,7 @@ if ($_POST && !$error) {
|
||||
$pass = $_POST["pass"];
|
||||
if ($pass != '' && !$_POST["hashed"] && !min_version(8)) {
|
||||
// compute hash in a separate query so that plain text password is not saved to history
|
||||
$pass = $connection->result("SELECT PASSWORD(" . q($pass) . ")");
|
||||
$pass = get_val("SELECT PASSWORD(" . q($pass) . ")");
|
||||
$error = !$pass;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ if ($_POST) {
|
||||
$row = $_POST;
|
||||
$grants = $new_grants;
|
||||
} else {
|
||||
$row = $_GET + array("host" => $connection->result("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', -1)")); // create user on the same domain by default
|
||||
$row = $_GET + array("host" => get_val("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', -1)")); // create user on the same domain by default
|
||||
$row["pass"] = $old_pass;
|
||||
if ($old_pass != "") {
|
||||
$row["hashed"] = true;
|
||||
|
Reference in New Issue
Block a user