summaryrefslogtreecommitdiff
path: root/program/include/session.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/session.inc')
-rw-r--r--program/include/session.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/program/include/session.inc b/program/include/session.inc
index a29eabba9..9becacf00 100644
--- a/program/include/session.inc
+++ b/program/include/session.inc
@@ -172,9 +172,13 @@ function sess_regenerate_id()
sess_destroy(session_id());
session_id($random);
- $cookie = session_get_cookie_params();
- setcookie(session_name(), "", time() - 3600);
- setcookie(session_name(), $random, $cookie['lifetime'] ? time() + $cookie['lifetime'] : 0, $cookie['path']);
+
+ $cookie = session_get_cookie_params();
+ $_lifetime = $cookie['lifetime'] ? time() + $cookie['lifetime'] : 0;
+
+ setcookie(session_name(), '', time() - 3600);
+ setcookie(session_name(), $random, $_lifetime, $cookie['path'],
+ $cookie['domain']);
return true;
}