aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/sessions.php2
-rw-r--r--languages/en.php3
2 files changed, 5 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();
}
}
diff --git a/languages/en.php b/languages/en.php
index 1972a81e7..017bc42dd 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -28,6 +28,9 @@ $english = array(
'logoutok' => "You have been logged out.",
'logouterror' => "We couldn't log you out. Please try again.",
+ 'loggedinrequired' => "You must be logged in to view that page.",
+ 'adminrequired' => "You must be an administrator to view that page.",
+
/**
* Errors
*/