From 94f59cfde84e9ac5461bf9376bebf0a6916d6a34 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sun, 18 Mar 2001 16:29:05 +0000 Subject: [PATCH] Trying to determine if variables are getting their types messed up. --- phpgwapi/inc/class.accounts_shared.inc.php | 5 +++-- phpgwapi/inc/class.acl.inc.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.accounts_shared.inc.php b/phpgwapi/inc/class.accounts_shared.inc.php index 7781e7b0c1..3ffb56ff7e 100644 --- a/phpgwapi/inc/class.accounts_shared.inc.php +++ b/phpgwapi/inc/class.accounts_shared.inc.php @@ -83,10 +83,11 @@ return False; } + $this->memberships = Array(); + for ($idx=0; $idxid2name(intval($security_equals[$idx])); - $this->memberships[] = Array('account_id' => $security_equals[$idx], 'account_name' => $name); + $this->memberships[] = Array('account_id' => intval($security_equals[$idx]), 'account_name' => $this->id2name(intval($security_equals[$idx]))); } return $this->memberships; diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index 4f7cf74d94..d5353de9e7 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -379,9 +379,10 @@ It should use the values in the $this->data $rights = 0; if ($this->db->num_rows() == 0 ){ return False; } while ($this->db->next_record()) { + $rights = 0; $rights |= $this->db->f('acl_rights'); if (!!($rights & $required) == True){ - $accounts[] = $this->db->f('acl_account'); + $accounts[] = intval($this->db->f('acl_account')); } } return $accounts; @@ -438,7 +439,7 @@ It should use the values in the $this->data $sql = "select acl_account, acl_rights from phpgw_acl where acl_appname = '$app' and " . "acl_location in "; $security = "('". $phpgw_info['user']['account_id'] ."'"; - $my_memberships = $phpgw->accounts->memberships($phpgw_info['user']['account_id']); + $my_memberships = $phpgw->accounts->memberships(intval($phpgw_info['user']['account_id'])); while($groups = each($my_memberships)) { $group = each($groups);