From ad8408a69a1910ae8759dd92d7735ab2ea99cda4 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 8 Dec 2009 12:45:00 +0000 Subject: gatekeeper functions now display helpful messages - closes #1060 git-svn-id: http://code.elgg.org/elgg/trunk@3742 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sessions.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engine/lib') diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php index f6758425a..0448007e1 100644 --- a/engine/lib/sessions.php +++ b/engine/lib/sessions.php @@ -588,6 +588,7 @@ function session_init($event, $object_type, $object) { function gatekeeper() { if (!isloggedin()) { $_SESSION['last_forward_from'] = current_page_url(); + register_error(elgg_echo('loggedinrequired')); forward(); } } @@ -601,6 +602,7 @@ function admin_gatekeeper() { if (!isadminloggedin()) { $_SESSION['last_forward_from'] = current_page_url(); + register_error(elgg_echo('adminrequired')); forward(); } } -- cgit v1.2.3