Fixed a bug on the way as in previous version it was checking if function
pg_parameter_status exists and used it directly, hence testing only the
currently used role.
pg_parameter_status is available in PHP 5.*
* @param $username The username of the user
* @return True if is a super user, false otherwise
*/
- function isSuperUser($username) {
+ function isSuperUser($username = '') {
$this->clean($username);
- if (function_exists('pg_parameter_status')) {
+ if (empty($usename)) {
$val = pg_parameter_status($this->conn->_connectionID, 'is_superuser');
if ($val !== false) return $val == 'on';
}