From daa8f5f8b37616d6dcbcb2936dfac9e5b42e7709 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 22 Jul 2009 13:04:34 +0000 Subject: Closes #1137: Setting a hidden variable "returntoreferer" in a login form will now cause the action to use the "referrer" address on a successful login. Version bump. git-svn-id: https://code.elgg.org/elgg/trunk@3411 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/login.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actions/login.php') diff --git a/actions/login.php b/actions/login.php index d937dc2f7..99a1bb54d 100644 --- a/actions/login.php +++ b/actions/login.php @@ -50,7 +50,9 @@ datalist_set('first_admin_login', time()); forward('pg/admin/plugins'); - } else + } else if (get_input('returntoreferer')) { + forward($_SERVER['HTTP_REFERER']); + } else forward("pg/dashboard/"); } } else { -- cgit v1.2.3