From 130e26983aedac1e4bb9f26d6a82c629248075e8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 17 Dec 2008 17:40:45 +0000 Subject: 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 --- core/helpers/access.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/helpers/access.php') 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; } } -- cgit v1.2.3