From a13d5f5407736e0f9811a541a20bbfe08747970d Mon Sep 17 00:00:00 2001 From: kevinjardine Date: Thu, 26 Feb 2009 17:56:05 +0000 Subject: Fixes to container permissions and widgets to allow default widgets to work with the Elgg permissions system. git-svn-id: https://code.elgg.org/elgg/trunk@2968 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/lib/entities.php') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 3597040c9..e9747d15c 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1321,14 +1321,14 @@ $container = get_entity($container_guid); - if (($container) && ($user)) + if ($container) { // If the user can edit the container, they can also write to it if ($container->canEdit($user_guid)) return true; // Basics, see if the user is a member of the group. - if ($container instanceof ElggGroup) { + if ($user && $container instanceof ElggGroup) { if (!$container->isMember($user)) { return false; } else { -- cgit v1.2.3