Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30530/functions
Modified Files:
userauth_functions.php
Log Message:
Fix log in cookie handling; patch by gueba
Index: userauth_functions.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/userauth_functions.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** userauth_functions.php 12 Jan 2010 19:33:41 -0000 1.12
--- userauth_functions.php 9 Feb 2010 15:40:20 -0000 1.13
***************
*** 95,99 ****
// Set the login cookie or session authentication values.
! if ($login_cookies == 'yes') {
$the_cookie = serialize(array('username' => $username, 'password' => $password));
setcookie('phpicalendar_login', $the_cookie, time()+(60*60*24*7*12*10), '/', $phpiCal_config->cookie_uri, 0);
--- 95,99 ----
// Set the login cookie or session authentication values.
! if ($phpiCal_config->login_cookies == 'yes' && empty($_COOKIE['phpicalendar_login'])) {
$the_cookie = serialize(array('username' => $username, 'password' => $password));
setcookie('phpicalendar_login', $the_cookie, time()+(60*60*24*7*12*10), '/', $phpiCal_config->cookie_uri, 0);
***************
*** 117,120 ****
--- 117,121 ----
if ($phpiCal_config->login_cookies == 'yes') {
setcookie('phpicalendar_login', '', time()-(60*60*24*7), '/', $phpiCal_config->cookie_uri, 0);
+ unset($_COOKIE['phpicalendar_login']);
} else {
// Check if the session has already been started.
|