From 5a84e151b27b97a8e6d68a4941356b153ac6796b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 7 Jun 2006 17:55:57 +0000 Subject: [PATCH] need to invalidate the cache, before new users can be assigned any memberships --- phpgwapi/inc/class.accounts.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.accounts.inc.php b/phpgwapi/inc/class.accounts.inc.php index f0faec20ed..ae2344a0ce 100644 --- a/phpgwapi/inc/class.accounts.inc.php +++ b/phpgwapi/inc/class.accounts.inc.php @@ -288,8 +288,6 @@ class accounts extends accounts_backend */ function save(&$data,$check_depricated_names=false) { - $this->cache_invalidate($data['account_id']); - if ($check_depricated_names) { foreach($this->depricated_names as $name) @@ -303,9 +301,12 @@ class accounts extends accounts_backend if (($id = parent::save($data)) && $data['account_type'] == 'u' && $data['account_primary_group'] && (!($memberships = $this->memberships($id,true)) || !in_array($data['account_primary_group'],$memberships))) { + $this->cache_invalidate($data['account_id']); $memberships[] = $data['account_primary_group']; $this->set_memberships($memberships,$id); } + $this->cache_invalidate($data['account_id']); + return $id; }