aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-08 12:45:00 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-08 12:45:00 +0000
commitad8408a69a1910ae8759dd92d7735ab2ea99cda4 (patch)
tree8731ee47736de3d99cc4d5af952998fa746e99d5 /engine/lib
parent5a4d2491058b0972146f9b7897b87d42102faee7 (diff)
downloadelgg-ad8408a69a1910ae8759dd92d7735ab2ea99cda4.tar.gz
elgg-ad8408a69a1910ae8759dd92d7735ab2ea99cda4.tar.bz2
gatekeeper functions now display helpful messages - closes #1060
git-svn-id: http://code.elgg.org/elgg/trunk@3742 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/sessions.php2
1 files changed, 2 insertions, 0 deletions
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();
}
}