diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/entities.php | 9 | ||||
-rw-r--r-- | engine/lib/group.php | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index d7cc502ed..c938727ff 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1158,8 +1158,13 @@ if ($container->canEdit()) return true;
// Basics, see if the user is a member of the group.
- if ($container instanceof ElggGroup)
- if (!$container->isMember($user)) return false;
+ if ($container instanceof ElggGroup) {
+ if (!$container->isMember($user)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
// See if anyone else has anything to say
return trigger_plugin_hook('container_permissions_check',$entity_type,array('container' => $container, 'user' => $user), false);
diff --git a/engine/lib/group.php b/engine/lib/group.php index 3d5c4bad8..a8d2d570e 100644 --- a/engine/lib/group.php +++ b/engine/lib/group.php @@ -230,7 +230,7 @@ */ public function isMember($user = 0) {
- if ($user == 0) $user = $_SESSION['user']; + if (!($user instanceof ElggUser)) $user = $_SESSION['user']; return is_group_member($this->getGUID(), $user->getGUID()); } |