From e2c758252a9f32a9724b9df2421522bad9719e4d Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 18 Aug 2008 13:37:03 -0400
Subject: [PATCH]
---
install/lib/installer_base.lib.php | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index db98d1f..cd94f5a 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -162,7 +162,12 @@
."TO '".$cf['ispconfig_user']."'@'".$from_host."' "
."IDENTIFIED BY '".$cf['ispconfig_password']."';";
if(!$this->db->query($query)) {
- $this->error('Unable to create database user: '.$cf['ispconfig_user']);
+ $tmp = $this->db->queryOneRecord("SELECT * from mysql.user WHERE User = '".$cf['ispconfig_user']."' AND Host = '$from_host'")
+ if($tmp["User"] == $cf['ispconfig_user'])) {
+ $this->db->query("UPDATE mysql.user SET `password` = PASSWORD('".$cf['ispconfig_password']."') WHERE User = '".$cf['ispconfig_user']."' AND Host = '$from_host'");
+ } else {
+ $this->error('Unable to create database user: '.$cf['ispconfig_user']);
+ }
}
//* Reload database privelages
--
Gitblit v1.9.1