######################################################################
#
#  Remove the login ticket
#
######################################################################
#
#  __COPYRIGHT__
#
# Copyright 2000-2008 University of Southampton. All Rights Reserved.
# 
#  __LICENSE__
#
######################################################################

use EPrints;

use strict;
my $session = new EPrints::Session;
exit( 0 ) unless( defined $session );



if( $session->get_repository->can_call( 'on_logout' ) )
{
	$session->get_repository->call( 'on_logout', $session );
}


my $ticket = $session->current_loginticket;
$ticket->remove if defined $ticket;

$session->logout;

EPrints::ScreenProcessor->process(
	session => $session,
	screenid => "Loggedout",
);

$session->terminate;
exit;



