From 5a1d1a2a16d0a808c8b075553b56daf14620fa42 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Wed, 28 Feb 2018 16:52:50 +0900 Subject: [PATCH] Improve isSuperUser() function to make pgpoolAdmin more useful. --- common.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index f45f979..e35c0bf 100644 --- a/common.php +++ b/common.php @@ -226,7 +226,7 @@ function isSuperUser($user_name) // Try to connect the backend by login user $conn = openDBConnection(array( - 'host' => 'localhost', + 'host' => PGPOOLADMIN_HOST, 'port' => $params['port'], 'dbname' => 'template1', 'user' => $_SESSION[SESSION_LOGIN_USER], @@ -238,6 +238,7 @@ function isSuperUser($user_name) if ($conn === FALSE) { $params = readConfigParams(array('port', 'health_check_user', 'health_check_password')); $conn = openDBConnection(array( + 'host' => PGPOOLADMIN_HOST, 'port' => $params['port'], 'dbname' => 'template1', 'user' => $params['health_check_user'], -- 2.39.5