ソースを参照

Merge pull request #15187 from vitormattos/bugfix-create-database-user

Bugfix: user is not allowed
tags/v17.0.0beta1
Roeland Jago Douma 4年前
コミット
b42b26eceb
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更4行の追加0行の削除
  1. 4
    0
      lib/private/Setup/PostgreSQL.php

+ 4
- 0
lib/private/Setup/PostgreSQL.php ファイルの表示

@@ -154,6 +154,10 @@ class PostgreSQL extends AbstractDatabase {
// create the user
$query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");
$query->execute();
if ($this->databaseExists($connection)) {
$query = $connection->prepare('GRANT CONNECT ON DATABASE ' . addslashes($this->dbName) . ' TO '.addslashes($this->dbUser));
$query->execute();
}
} catch (DatabaseException $e) {
$this->logger->error('Error while trying to create database user');
$this->logger->logException($e);

読み込み中…
キャンセル
保存