X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Flogin.php;h=82ba320b98aa677803077ac67cff1f2c2c9d5cb5;hp=7c185581f476aec24ff551ac29dbe428c2b02cdc;hb=0f101579c15a7143c6e4997603b0e19df77eec62;hpb=d30d79f24098bb0e09a68467539912208434ac2f
diff --git a/src/login.php b/src/login.php
index 7c185581..82ba320b 100644
--- a/src/login.php
+++ b/src/login.php
@@ -1,61 +1,81 @@
-
+
-
-
- echo "
\n";
-
- // let's check to see if they compiled with gettext support
- if (!function_exists("_")) {
- echo "PHP was not configured --with-gettext. Reconfigure and try again.";
- exit;
- }
+ // Need the base URI to set the cookies. (Same code as in webmail.php)
+ ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
+ $base_uri = $regs[1];
+
+ setcookie("username", '', 0, $base_uri);
+ setcookie("key", '', 0, $base_uri);
+ setcookie("logged_in", 0, 0, $base_uri);
+ header ("Pragma: no-cache");
+
+ // In case the last session was not terminated properly, make sure
+ // we get a new one.
+ $cookie_params = session_get_cookie_params();
+ setcookie(session_name(),"",0,$cookie_params["domain"].$cookie_params["path"]);
+
+ do_hook('login_cookie');
+ echo "";
+ echo "";
+ echo $org_name . " - " . _("Login");
+ echo "\n";
+ echo "\n";
+ echo "\n";
+ do_hook("login_bottom");
?>