aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-04 12:36:05 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-04 12:36:05 +0000
commit8b17883ae53d1c01ef17e3b8c71781236102ba3d (patch)
tree3bd5acf0f4abf7a414a3596352da861e7f05126a /mod/groups
parent45be54125d929e00ad206da5cd2800fc2c26de4d (diff)
downloadelgg-8b17883ae53d1c01ef17e3b8c71781236102ba3d.tar.gz
elgg-8b17883ae53d1c01ef17e3b8c71781236102ba3d.tar.bz2
preventing crashes when user does not have access to the group on group profile page
git-svn-id: http://code.elgg.org/elgg/trunk@8580 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/lib/groups.php3
-rw-r--r--mod/groups/views/default/groups/profile/activity_module.php3
2 files changed, 6 insertions, 0 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index 563ed3cff..dc796d159 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -188,6 +188,9 @@ function groups_handle_profile_page($guid) {
$autofeed = true;
$group = get_entity($guid);
+ if (!$group) {
+ forward('pg/groups/all');
+ }
elgg_push_breadcrumb($group->name);
diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php
index 60a8e025c..1c7e6daa2 100644
--- a/mod/groups/views/default/groups/profile/activity_module.php
+++ b/mod/groups/views/default/groups/profile/activity_module.php
@@ -12,6 +12,9 @@ if ($vars['entity']->activity_enable == 'no') {
}
$group = $vars['entity'];
+if (!$group) {
+ return true;
+}
$all_link = elgg_view('output/url', array(