Skip to content
Snippets Groups Projects
Commit dd9a0812 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: no ' on command to create user on pgsql

parent b0ebaec0
No related branches found
No related tags found
No related merge requests found
......@@ -981,7 +981,8 @@ class DoliDBPgsql extends DoliDB
*/
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{
$sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."' with password '".$this->escape($dolibarr_main_db_pass)."'";
// Note: using ' on user does not works with pgsql
$sql = "CREATE USER ".$this->escape($dolibarr_main_db_user)." with password '".$this->escape($dolibarr_main_db_pass)."'";
dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log
$resql=$this->query($sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment