From cfc22fd3235fd19566152ed9eb4280f58f9926c6 Mon Sep 17 00:00:00 2001 From: "kiko%async.com.br" <> Date: Thu, 27 Nov 2003 09:00:59 +0000 Subject: Bug 226324: Move relogin.cgi code to Bugzilla::Auth::CGI. Provide a logout() method that is proxied through Bugzilla.pm's logout(), and fix callers to use it. r=justdave, bbaetz, a=justdave --- Bugzilla.pm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 871b76a54..7e7d50004 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -99,8 +99,17 @@ sub login { } sub logout { + use Bugzilla::Auth::CGI; + # remove cookies and clean up database state + Bugzilla::Auth::CGI->logout(); + logout_request(); +} + +sub logout_request { undef $_user; $::userid = 0; + delete $::COOKIE{"Bugzilla_login"}; + delete $::COOKIE{"Bugzilla_logincookie"}; } my $_dbh; @@ -266,10 +275,13 @@ L. =item C -Logs out the current user. For the moment, this will just cause calls to -C to return C. Eventually this will handle deleting cookies from -the browser and values from the database, which is currently all handled -by C. +Logs out the current user. + +=item C + +Essentially, causes calls to C to return C. This has the +effect of logging out a user for the current request only; cookies and +database state are left intact. =item C -- cgit v1.2.3-24-g4f1b