Portal: display logout status to user

This commit is contained in:
Clément Oudot 2010-02-20 11:44:05 +00:00
parent c2dc15ab6e
commit 3eac5ce288

View File

@ -402,8 +402,10 @@ sub error_type {
return "positive" return "positive"
if ( if (
scalar( scalar(
grep { /^$code$/ } grep { /^$code$/ } (
( PE_REDIRECT, PE_DONE, PE_OK, PE_PASSWORD_OK, PE_MAILOK, ) PE_REDIRECT, PE_DONE, PE_OK, PE_PASSWORD_OK,
PE_MAILOK, PE_LOGOUT_OK,
)
) )
); );
@ -827,7 +829,10 @@ sub controlExistingSession {
if ( $self->param('logout') ) { if ( $self->param('logout') ) {
# Delete session in global storage # Delete session in global storage
$self->_deleteSession($h); unless ( $self->_deleteSession($h) ) {
$self->lmLog( "Unable to delete session $id", 'error' );
return PE_ERROR;
}
# Call issuerDB logout # Call issuerDB logout
eval { $self->_sub('issuerLogout'); }; eval { $self->_sub('issuerLogout'); };
@ -841,11 +846,8 @@ sub controlExistingSession {
$self->lmLog( "Error when calling authLogout: $@", 'debug' ); $self->lmLog( "Error when calling authLogout: $@", 'debug' );
} }
$self->{error} = PE_REDIRECT; # Display logout message
return PE_LOGOUT_OK;
# Redirect user
$self->_subProcess(qw(autoRedirect));
return PE_FIRSTACCESS;
} }
# If the user wants to purge other sessions # If the user wants to purge other sessions