summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorGordian Edenhofer <gordian.edenhofer@gmail.com>2015-06-18 21:28:17 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-27 13:04:03 +0200
commit6395a5d5b86ce4aca75a4eb246db77cd08ae0ffc (patch)
tree075c3a5be69e3438fd2d33abe97465266d6e5b22 /web/html
parentd841357d7f68e2b5d763aeef1dc1ce050b6f11df (diff)
downloadaur-6395a5d5b86ce4aca75a4eb246db77cd08ae0ffc.tar.gz
aur-6395a5d5b86ce4aca75a4eb246db77cd08ae0ffc.tar.xz
Redirect at previous page after a successful login
After the user was authenticated a redirect to the site which linked the user to the login page is done. This fixes FS#32481. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/login.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/html/login.php b/web/html/login.php
index f898a578..ab7bac9e 100644
--- a/web/html/login.php
+++ b/web/html/login.php
@@ -42,6 +42,11 @@ html_header('AUR ' . __("Login"));
<p>
<input type="submit" class="button" value="<?php print __("Login"); ?>" />
<a href="<?= get_uri('/passreset/') ?>">[<?= __('Forgot Password') ?>]</a>
+ <?php if (in_request('referer') !== ""): ?>
+ <input id="id_referer" type="hidden" name="referer" value="<?= in_request('referer') ?>" />
+ <?php elseif (isset($_SERVER['HTTP_REFERER'])): ?>
+ <input id="id_referer" type="hidden" name="referer" value="<?= htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES) ?>" />
+ <?php endif; ?>
</p>
</fieldset>
</form>