Show logout.html syntax highlighted
% # vim: set syntax=mason:
<%init>
my $user = Apache::SiteControl->getCurrentUser($r);
my $success = 0;
my $logger = Log::Log4perl->get_logger('alphamail');
my $c = new AlphaMail::Middleware($user->getAttribute('imap'), $user->getUsername(), $user->getAttribute('password'), $config);
$logger->debug("Running logout");
if(defined($user) && $user->isa("Apache::SiteControl::User")) {
$logger->debug("Calling Site control's logout");
$user->logout($r);
$c->flush; # Drop all cached entries
}
$logger->debug("Going back to the login page");
$m->redirect('/mail');
</%init>
See more files for this project here