From 3c55ebb349b3a420b9c594ac7d240a5bf4229883 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sun, 11 Feb 2001 19:06:22 +0000 Subject: [PATCH] added a local instantiation of acl in memberships --- phpgwapi/inc/class.accounts_shared.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.accounts_shared.inc.php b/phpgwapi/inc/class.accounts_shared.inc.php index a067dfbf65..f0aac76abe 100644 --- a/phpgwapi/inc/class.accounts_shared.inc.php +++ b/phpgwapi/inc/class.accounts_shared.inc.php @@ -71,15 +71,17 @@ function members ($account_id = False) { global $phpgw_info, $phpgw; - if ($account_id == ""){ $account_id = $phpgw_info["user"]["account_id"]; } - elseif (gettype($account_id) == "string") { $account_id = $this->name2id($account_id); } + if ($account_id == ''){ $account_id = $phpgw_info['user']['account_id']; } + elseif (gettype($account_id) == 'string') { $account_id = $this->name2id($account_id); } $security_equals = Array(); - $security_equals = $phpgw->acl->get_ids_for_location(intval($account_id), 1, "phpgw_group"); + $acl = CreateObject('phpgwapi.acl'); + $security_equals = $acl->get_ids_for_location(intval($account_id), 1, 'phpgw_group'); + unset($acl); if (!$security_equals) { return False; } for ($idx=0; $idxname2id($security_equals[$idx]); - $this->members[] = Array("account_id" => $security_equals[$idx], "account_name" => "$name"); + $this->members[] = Array('account_id' => $security_equals[$idx], 'account_name' => "$name"); } return $this->members; }