diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index ae9b49b9c8..d1e9b625ba 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -126,15 +126,12 @@ if (gettype($id) == "string") { $id = $this->name2id($id); } $groups = Array(); - $group_memberships = $phpgw->acl->get_location_list_for_id("phpgw_group", 1, "u", intval($id)); - if ($group_memberships) { - for ($idx=0; $idxacl->get_location_list_for_id("phpgw_group", 1, intval($id)); + if (!$group_memberships) { return False; } + for ($idx=0; $idxread_groups($owner); + $groups = $this->read_groups(intval($owner)); if (gettype($groups) == "array") { -// echo "\n\n\n\n\ntest: " . count($groups) . "\n\n\n\n\n\n"; while ($group = each($groups)) { - $s .= " or $table like '%," . $group[1] . ",%'"; + $s .= " or $table like '%," . $group[0] . ",%'"; } } return $s; diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index 458d8d7fc8..5082cdb11b 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -98,14 +98,11 @@ if (gettype($id) == "string") { $id = $this->name2id($id); } $groups = Array(); $group_memberships = $phpgw->acl->get_location_list_for_id("phpgw_group", 1, intval($id)); - if ($group_memberships) { - for ($idx=0; $idx