Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Re: [ryel01] Sessions & logout.htm

Quote Reply
Re: [ryel01] Sessions & logout.htm In reply to
It's because logout and login use different methods to print page. login uses the NoAuth print_page, and logout uses the print_page from GMail. The NoAuth print_page, adds those extra variables (such as sessions_cookies) and GMail doesn't. That's why it doesn't work. There are two ways to get around this:
1) Change logout.htm, to do a redirect to login.htm with message=Your+message+goes+here.
eg:
Code:
<META HTTP-EQUIV="refresh" CONTENT="0;URL=http://domain.com/cgi-bin/user/login.cgi?t=<%t%>;message=You+have+been+successfully+logged+out.">

2) Change logout.cgi, to add the variables that NoAuth's print_page adds (just before it calls print_page):
Code:
use GMail::NoAuth;
my @tags = GMail::NoAuth->get_tags();
push @tags, { message => $CFG->{language}->{LOGOUT_SUCCESS} };
# Print the logout page
GMail->print_page($CFG->{templates}->{logout}, @tags);
You would also add the LOGOUT_SUCCESS language variable. You would now have these variables available on the logout page. I'll talk to Alex to see if he thinks this is worth changing in the current code.

You can change it to not use the logout.htm page as well but changing your ConfigData.pm (back it up before modifying it!). You should see a key 'templates', and in that hash, 'logout'. Currently its value is 'logout.htm'. If you change that value to 'login.htm', then they'll be sent to the login.htm page on logout. Combine this with the added tags we did in 2), and you'll acheive what you wanted.

Adrian
Subject Author Views Date
Thread Sessions & logout.htm ryel01 2343 May 27, 2002, 10:41 PM
Post Re: [ryel01] Sessions & logout.htm
ryel01 2303 May 27, 2002, 10:44 PM
Thread Re: [ryel01] Sessions & logout.htm
brewt 2321 May 28, 2002, 12:22 AM
Post Re: [brewt] Sessions & logout.htm
ryel01 2282 May 28, 2002, 3:09 PM
Thread Re: [brewt] Sessions & logout.htm
ryel01 2275 May 29, 2002, 3:38 AM
Post Re: [ryel01] Sessions & logout.htm
cK 2266 May 29, 2002, 6:47 AM