From cf2da2f9aacd1b13ad9019f44a3f1edd824cd015 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 28 Jan 2011 11:44:22 -0500
Subject: [PATCH] Improve session validity check with changing auth cookies; reduce writes to DB; better phpdoc

---
 index.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.php b/index.php
index 3d57571..a80e76d 100644
--- a/index.php
+++ b/index.php
@@ -98,7 +98,7 @@
     $RCMAIL->session->regenerate_id();
 
     // send auth cookie if necessary
-    $RCMAIL->authenticate_session();
+    $RCMAIL->session->set_auth_cookie();
 
     // log successful login
     rcmail_log_login();
@@ -141,7 +141,7 @@
 
 // check session and auth cookie
 else if ($RCMAIL->task != 'login' && $_SESSION['user_id'] && $RCMAIL->action != 'send') {
-  if (!$RCMAIL->authenticate_session()) {
+  if (!$RCMAIL->session->check_auth()) {
     $OUTPUT->show_message('sessionerror', 'error');
     $RCMAIL->kill_session();
   }

--
Gitblit v1.9.1