Skip to content

Commit e2c7582

Browse files
committed
1 parent 748bd4e commit e2c7582

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,12 @@ public function add_database_server_record() {
162162
."TO '".$cf['ispconfig_user']."'@'".$from_host."' "
163163
."IDENTIFIED BY '".$cf['ispconfig_password']."';";
164164
if(!$this->db->query($query)) {
165-
$this->error('Unable to create database user: '.$cf['ispconfig_user']);
165+
$tmp = $this->db->queryOneRecord("SELECT * from mysql.user WHERE User = '".$cf['ispconfig_user']."' AND Host = '$from_host'")
166+
if($tmp["User"] == $cf['ispconfig_user'])) {
167+
$this->db->query("UPDATE mysql.user SET `password` = PASSWORD('".$cf['ispconfig_password']."') WHERE User = '".$cf['ispconfig_user']."' AND Host = '$from_host'");
168+
} else {
169+
$this->error('Unable to create database user: '.$cf['ispconfig_user']);
170+
}
166171
}
167172

168173
//* Reload database privelages

0 commit comments

Comments
 (0)