summaryrefslogtreecommitdiffstats
path: root/web/lib/acctfuncs.inc
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-02-21 18:17:55 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-02-21 18:17:58 +0100
commit52dfa9ca7c5ef12f4e65ff88a0863f0a0f2acb19 (patch)
tree4178840b1a4bcb0e2f9ec2a6a4eab0fe8e19581d /web/lib/acctfuncs.inc
parent31b0b68b479aff1f85feb89010ed3fcf40a95673 (diff)
downloadaur-52dfa9ca7c5ef12f4e65ff88a0863f0a0f2acb19.tar.gz
aur-52dfa9ca7c5ef12f4e65ff88a0863f0a0f2acb19.tar.xz
Make persistent cookie timeout configurable via "config.inc" (FS#22994).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/acctfuncs.inc')
-rw-r--r--web/lib/acctfuncs.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc
index 30b5a2f3..513a142a 100644
--- a/web/lib/acctfuncs.inc
+++ b/web/lib/acctfuncs.inc
@@ -601,6 +601,8 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") {
* SID of 0 means login failed.
*/
function try_login() {
+ global $PERSISTENT_COOKIE_TIMEOUT;
+
$login_error = "";
$new_sid = "";
$userID = null;
@@ -641,7 +643,7 @@ function try_login() {
if ($_POST['remember_me'] == "on") {
# Set cookies for 30 days.
- $cookie_time = time() + (60 * 60 * 24 * 30);
+ $cookie_time = time() + $PERSISTENT_COOKIE_TIMEOUT;
# Set session for 30 days.
$q = "UPDATE Sessions SET LastUpdateTS = $cookie_time ";