summaryrefslogtreecommitdiff
path: root/core/helpers/access.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-17 17:40:45 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-17 17:40:45 +0000
commit130e26983aedac1e4bb9f26d6a82c629248075e8 (patch)
treedb8d5b860a3a81649f8576f1fb16cde1c08725f0 /core/helpers/access.php
parent2abe82f106ecf68d40df5dee40876edd06ff5f60 (diff)
Add initialization to the user module to put the user and group_ids
into the session, for easy access. This cuts down the number of queries when we're loading images through file_proxy.php
Diffstat (limited to 'core/helpers/access.php')
-rw-r--r--core/helpers/access.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php
index 05799bf5..82d7b9b6 100644
--- a/core/helpers/access.php
+++ b/core/helpers/access.php
@@ -98,8 +98,8 @@ class access_Core {
$resource = $perm_name == "view" ?
$item : model_cache::get("access_cache", $item->id, "item_id");
- foreach (user::active()->groups as $group) {
- if ($resource->__get("{$perm_name}_{$group->id}") === self::ALLOW) {
+ foreach (user::group_ids() as $id) {
+ if ($resource->__get("{$perm_name}_$id") === self::ALLOW) {
return true;
}
}