aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/sessions.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 09:49:45 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 09:49:45 +0000
commitdeb2e286301f0b0472cd9d742fd4d0777035d5d4 (patch)
treedd54129d0a41cf0b612acf369a04814e57c897f7 /engine/lib/sessions.php
parente61a98c5dd04391db3eb7e3a087de633e2a6b0fe (diff)
downloadelgg-deb2e286301f0b0472cd9d742fd4d0777035d5d4.tar.gz
elgg-deb2e286301f0b0472cd9d742fd4d0777035d5d4.tar.bz2
Fixes #2237: Added 'reason' parameter to forward() to allow proper headers and more flexible destinations via plugin hooks. Also made use of this in core gatekeeper functions and in pagehandler.php
git-svn-id: http://code.elgg.org/elgg/trunk@7373 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/sessions.php')
-rw-r--r--engine/lib/sessions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index c42af2ed3..5cb3e8260 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -497,7 +497,7 @@ function gatekeeper() {
if (!isloggedin()) {
$_SESSION['last_forward_from'] = current_page_url();
register_error(elgg_echo('loggedinrequired'));
- forward();
+ forward('', 'login');
}
}
@@ -512,7 +512,7 @@ function admin_gatekeeper() {
if (!isadminloggedin()) {
$_SESSION['last_forward_from'] = current_page_url();
register_error(elgg_echo('adminrequired'));
- forward();
+ forward('', 'admin');
}
}