summaryrefslogtreecommitdiff
path: root/lib/plugins/authpgsql/auth.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/authpgsql/auth.php')
-rw-r--r--lib/plugins/authpgsql/auth.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php
index e51b39858..de41598e0 100644
--- a/lib/plugins/authpgsql/auth.php
+++ b/lib/plugins/authpgsql/auth.php
@@ -159,9 +159,11 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
if($first) $sql .= " OFFSET $first";
$result = $this->_queryDB($sql);
- foreach($result as $user)
- if(($info = $this->_getUserInfo($user['user'])))
+ foreach($result as $user) {
+ if(($info = $this->_getUserInfo($user['user']))) {
$out[$user['user']] = $info;
+ }
+ }
$this->_unlockTables();
$this->_closeDB();
@@ -212,7 +214,10 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
$sql = str_replace('%{user}', addslashes($user), $sql);
$sql = str_replace('%{gid}', addslashes($gid), $sql);
$sql = str_replace('%{group}', addslashes($group), $sql);
- if($this->_modifyDB($sql) !== false) return true;
+ if($this->_modifyDB($sql) !== false) {
+ $this->_flushUserInfoCache($user);
+ return true;
+ }
if($newgroup) { // remove previously created group on error
$sql = str_replace('%{gid}', addslashes($gid), $this->conf['delGroup']);
@@ -267,6 +272,7 @@ class auth_plugin_authpgsql extends auth_plugin_authmysql {
}
if($gid !== false){
+ $this->_flushUserInfoCache($user);
return true;
} else {
/* remove the new user and all group relations if a group can't