File: logout.html

package info (click to toggle)
libapache2-sitecontrol-perl 1.05-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, forky, sid, trixie
  • size: 208 kB
  • sloc: perl: 558; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<HTML>
   <HEAD>
      <TITLE>LOGOUT</TITLE>
   </HEAD>
   <BODY bgcolor="white">
% if($success) {
      <P>You have been logged out.</P>
% } else {
      <P>Attempt to log out failed. You were not logged in.</P>
% }
   </BODY>
</HTML>

<%init>
my $user = Apache2::SiteControl->getCurrentUser($r);
my $success = 0;

if(defined($user) && $user->isa("Apache2::SiteControl::User")) {
   $user->logout($r);
   $success = 1;
}
</%init>