aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-08 18:37:17 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-08 18:37:17 +0000
commitc0e6998b01ddc9b87fd0869f3662cef3bca5b33b (patch)
tree727c4a7e78b6989282aac5f1e6aa250f73b5fd94 /engine/lib
parent6c10be39372a8b282d255f940b4a9237b213e6b4 (diff)
downloadelgg-c0e6998b01ddc9b87fd0869f3662cef3bca5b33b.tar.gz
elgg-c0e6998b01ddc9b87fd0869f3662cef3bca5b33b.tar.bz2
Solved write issues in groups for non-admin users.
git-svn-id: https://code.elgg.org/elgg/trunk@1808 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php9
-rw-r--r--engine/lib/group.php2
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());
}