summaryrefslogtreecommitdiffstats
path: root/web/lib/acctfuncs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/acctfuncs.inc')
-rw-r--r--web/lib/acctfuncs.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc
index bbd6b740..73db2708 100644
--- a/web/lib/acctfuncs.inc
+++ b/web/lib/acctfuncs.inc
@@ -644,7 +644,12 @@ function try_login() {
if ($logged_in) {
# set our SID cookie
- setcookie("AURSID", $new_sid, 0, "/");
+ if ($_POST['remember_me'] == "on")
+ # Set cookies for 30 days.
+ $cookie_time = time() + (60 * 60 * 24 * 30);
+ else
+ $cookie_time = 0;
+ setcookie("AURSID", $new_sid, $cookie_time, "/");
# header("Location: /index.php");
header("Location: " . $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']);
$login_error = "";