aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/lib
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2013-07-05 20:10:12 -0400
committercash <cash.costello@gmail.com>2013-07-05 20:10:12 -0400
commita873fa6429460ccebbfdb5b7d17f124c80a6ee5c (patch)
tree539fb4a8de4c892ba0eec16f2bb5b58280e86790 /mod/groups/lib
parent175c65bec4a46ee7ffa424555870b383e77bd3bf (diff)
downloadelgg-a873fa6429460ccebbfdb5b7d17f124c80a6ee5c.tar.gz
elgg-a873fa6429460ccebbfdb5b7d17f124c80a6ee5c.tar.bz2
Fixes #5745 serve 404 pages when someone requests content of a user that does not exist
Diffstat (limited to 'mod/groups/lib')
-rw-r--r--mod/groups/lib/discussion.php5
-rw-r--r--mod/groups/lib/groups.php4
2 files changed, 4 insertions, 5 deletions
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php
index ab2fe4849..874e21b2d 100644
--- a/mod/groups/lib/discussion.php
+++ b/mod/groups/lib/discussion.php
@@ -39,9 +39,8 @@ function discussion_handle_list_page($guid) {
elgg_set_page_owner_guid($guid);
$group = get_entity($guid);
- if (!$group) {
- register_error(elgg_echo('group:notfound'));
- forward();
+ if (!elgg_instanceof($group, 'group')) {
+ forward('', '404');
}
elgg_push_breadcrumb($group->name);
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index 0557d41eb..e5b047eba 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -255,8 +255,8 @@ function groups_handle_profile_page($guid) {
elgg_push_context('group_profile');
$group = get_entity($guid);
- if (!$group) {
- forward('groups/all');
+ if (!elgg_instanceof($group, 'group')) {
+ forward('', '404');
}
elgg_push_breadcrumb($group->name);