aboutsummaryrefslogtreecommitdiff
path: root/actions/login.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-07-22 13:04:34 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-07-22 13:04:34 +0000
commitdaa8f5f8b37616d6dcbcb2936dfac9e5b42e7709 (patch)
treebe75f8cc7438bf2792f028e57bd1f70665b5940a /actions/login.php
parentff1e60a25a3e067105a375b366c2946bc1712fe1 (diff)
downloadelgg-daa8f5f8b37616d6dcbcb2936dfac9e5b42e7709.tar.gz
elgg-daa8f5f8b37616d6dcbcb2936dfac9e5b42e7709.tar.bz2
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
Diffstat (limited to 'actions/login.php')
-rw-r--r--actions/login.php4
1 files changed, 3 insertions, 1 deletions
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 {