Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Scoop Box Exchange - Show Box: logout_everywhere 1.00

Author: janra [Info]

Description:

This logs the user out from all computers they've used to log in to the scoop site. Useful if you use computers that aren't yours and can't remember if you logged out or not. Based on the logout box, mostly for the redirect stuff. Note that this doesn't remove the cookie from the other computer - what it does is remove the session line in the database that ties the cookie to the user's UID. The other computer still has the cookie and it still has session information such as comment display, but is anonymous instead of logged in.

Box Code:

my $logout_url = $S->var('logout_url')
\|\| ($S->var('rootdir') . '/');
my $uid = $S->dbh->quote($S->{UID});

my ($rv,$sth) = $S->db_delete({
FROM => 'sessions',
WHERE => "item='UID' AND value=$uid"
});


$S->{APACHE}->headers_out->{'Location'} = "$logout_url";

# the following is probably unneccesary,
# but just in case...
return { content => qq{Redirecting to <a href="$logout_url">$logout_url</a>} }
Display: Sort:
Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Scoop
The swiss army chainsaw of Content Managment.

Login
Make a new account
Username:
Password:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search