From 533a3c495f7de3259680b7992d45e186222319e2 Mon Sep 17 00:00:00 2001 From: seek3r Date: Mon, 4 Sep 2000 13:31:05 +0000 Subject: [PATCH] minor fixes --- login.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/login.php b/login.php index bfe9707f7d..ae2ea51a51 100755 --- a/login.php +++ b/login.php @@ -22,6 +22,11 @@ include($phpgw_info["server"]["include_root"] . "/lang/" . "en" . "_login.inc.php"); include($phpgw_info["server"]["api_dir"] . "/phpgw_template.inc.php"); + if ($code != 10 && $phpgw_info["server"]["usecookies"] == False) { + Setcookie("sessionid"); + Setcookie("kp3"); + } + $deny_login = False; $tmpl = new Template($phpgw_info["server"]["template_dir"]); @@ -44,9 +49,12 @@ function show_cookie() { global $phpgw_info, $code, $lastloginid, $login; - - if ($code != 5) { - return $lastloginid; + /* This needs to be this way, because if someone doesnt want to use cookies, we shouldnt sneak one in */ + if ($code != 5 && $phpgw_info["server"]["usecookies"] == True){ + if (!empty($login)) { + SetCookie("lastloginid",$login, time() + (24 * 3600 * 14),"/"); + } + return $lastloginid; } }