aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-04 12:37:09 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-04 12:37:09 +0000
commit9791ab58670f07eae1dfe7f6f96150872bfff435 (patch)
tree5efdab81c11aaf4efffe1f6c12b0159587bebe7e
parent8b17883ae53d1c01ef17e3b8c71781236102ba3d (diff)
downloadelgg-9791ab58670f07eae1dfe7f6f96150872bfff435.tar.gz
elgg-9791ab58670f07eae1dfe7f6f96150872bfff435.tar.bz2
Fixes #1926 flushing access list when adding a user to a group
git-svn-id: http://code.elgg.org/elgg/trunk@8581 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/groups/actions/groups/membership/join.php2
-rw-r--r--mod/groups/start.php3
2 files changed, 4 insertions, 1 deletions
diff --git a/mod/groups/actions/groups/membership/join.php b/mod/groups/actions/groups/membership/join.php
index edcffb507..210e285a5 100644
--- a/mod/groups/actions/groups/membership/join.php
+++ b/mod/groups/actions/groups/membership/join.php
@@ -15,7 +15,7 @@ $group_guid = get_input('group_guid');
$user = get_entity($user_guid);
-// @todo investigate if the access bypass is needed
+// access bypass for getting invisible group
$ia = elgg_set_ignore_access(true);
$group = get_entity($group_guid);
elgg_set_ignore_access($ia);
diff --git a/mod/groups/start.php b/mod/groups/start.php
index d4649c90b..f8cff6a8a 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -447,6 +447,9 @@ function groups_join_group($group, $user) {
elgg_set_ignore_access($ia);
if ($result) {
+ // flush user's access info so the collection is added
+ get_access_list($user->guid, 0, true);
+
// Remove any invite or join request flags
remove_entity_relationship($group->guid, 'invited', $user->guid);
remove_entity_relationship($user->guid, 'membership_request', $group->guid);