aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2010-02-09 15:40:18 +0000
committerJason Oster <parasytic@users.sourceforge.net>2010-02-09 15:40:18 +0000
commit6f43ce3da6131d96ba5e56f2279d279a30d65db6 (patch)
tree4f25c58bc938374826466ea78fe96ec4cc95e70c /functions
parent91920cc99be323db6607e4d0ef823283cc575e11 (diff)
downloadphpicalendar-6f43ce3da6131d96ba5e56f2279d279a30d65db6.tar.gz
phpicalendar-6f43ce3da6131d96ba5e56f2279d279a30d65db6.tar.bz2
phpicalendar-6f43ce3da6131d96ba5e56f2279d279a30d65db6.zip
Fix log in cookie handling; patch by gueba
Diffstat (limited to 'functions')
-rw-r--r--functions/userauth_functions.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions/userauth_functions.php b/functions/userauth_functions.php
index b8abacb..98a7020 100644
--- a/functions/userauth_functions.php
+++ b/functions/userauth_functions.php
@@ -94,7 +94,7 @@ function user_login() {
}
// Set the login cookie or session authentication values.
- if ($login_cookies == 'yes') {
+ 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);
} else {
@@ -116,6 +116,7 @@ function user_logout() {
// Clear the login cookie or session authentication values.
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.
if (!session_id()) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy