summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-03-08 08:40:47 +0000
committeralecpl <alec@alec.pl>2011-03-08 08:40:47 +0000
commitc294eaa3f27ca5f38101eb4a1692111ac0ee82f8 (patch)
tree30d6e36f28536a15041d6b418377ff3a7daac5e4 /index.php
parentfb061aaecead8248d1a5cc43cc9593832d7bbdc0 (diff)
- Performance improvement: Remove redundant DELETE query (for old session deletion) on login
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/index.php b/index.php
index 1b1522683..6ebc48e3d 100644
--- a/index.php
+++ b/index.php
@@ -98,7 +98,9 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
$RCMAIL->login($auth['user'], $auth['pass'], $auth['host'])) {
// create new session ID
$RCMAIL->session->remove('temp');
- $RCMAIL->session->regenerate_id();
+ // regenerate the session, don't destroy the current session
+ // it was destroyed already by $RCMAIL->kill_session() above
+ $RCMAIL->session->regenerate_id(false);
// send auth cookie if necessary
$RCMAIL->session->set_auth_cookie();
@@ -110,7 +112,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
$query = array();
if ($url = get_input_value('_url', RCUBE_INPUT_POST)) {
parse_str($url, $query);
-
+
// prevent endless looping on login page
if ($query['_task'] == 'login')
unset($query['_task']);