From 32b9e8488957c109db3fee86a0f941d3685cb52b Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 23 Jun 2012 10:35:29 -0400 Subject: Fixes #4610 better handling of content requiring a logged in user --- mod/blog/lib/blog.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod/blog') diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 43de7a646..9a02a8cc3 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -22,8 +22,9 @@ function blog_get_page_content_read($guid = NULL) { $return['filter'] = ''; if (!elgg_instanceof($blog, 'object', 'blog')) { - $return['content'] = elgg_echo('noaccess'); - return $return; + register_error(elgg_echo('noaccess')); + $_SESSION['last_forward_from'] = current_page_url(); + forward(''); } $return['title'] = $blog->title; -- cgit v1.2.3