diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/entities.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index c94acbf08..78fa915dd 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -452,8 +452,10 @@ function can_write_to_container($user_guid = 0, $container_guid = 0, $type = 'al $container_guid = elgg_get_page_owner_guid(); } + $return = false; + if (!$container_guid) { - $return = TRUE; + $return = true; } $container = get_entity($container_guid); @@ -461,16 +463,16 @@ function can_write_to_container($user_guid = 0, $container_guid = 0, $type = 'al if ($container) { // If the user can edit the container, they can also write to it if ($container->canEdit($user_guid)) { - $return = TRUE; + $return = true; } // Basics, see if the user is a member of the group. // @todo this should be moved to the groups plugin/library if ($user && $container instanceof ElggGroup) { if (!$container->isMember($user)) { - $return = FALSE; + $return = false; } else { - $return = TRUE; + $return = true; } } } |