Remove corrupted sessions (#2334)
This commit is contained in:
parent
8e607da7fe
commit
4ecce4726b
|
@ -12,7 +12,7 @@ use Lemonldap::NG::Portal::Main::Constants qw(
|
||||||
PE_SENDRESPONSE
|
PE_SENDRESPONSE
|
||||||
);
|
);
|
||||||
|
|
||||||
our $VERSION = '2.0.9';
|
our $VERSION = '2.0.10';
|
||||||
|
|
||||||
extends qw(
|
extends qw(
|
||||||
Lemonldap::NG::Portal::Main::Plugin
|
Lemonldap::NG::Portal::Main::Plugin
|
||||||
|
@ -177,7 +177,18 @@ sub activeSessions {
|
||||||
$self->module->searchOn( $moduleOptions, $self->conf->{whatToTrace},
|
$self->module->searchOn( $moduleOptions, $self->conf->{whatToTrace},
|
||||||
$user );
|
$user );
|
||||||
|
|
||||||
$self->logger->debug("Building array ref with sessions info...");
|
$self->logger->debug('Remove corrupted sessions...');
|
||||||
|
my $corrupted = 0;
|
||||||
|
foreach ( keys %$sessions ) {
|
||||||
|
unless ( $sessions->{$_}->{_session_kind} eq 'SSO' ) {
|
||||||
|
delete $sessions->{$_};
|
||||||
|
$corrupted++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$self->logger->info("$corrupted corrupted session(s) removed")
|
||||||
|
if $corrupted;
|
||||||
|
|
||||||
|
$self->logger->debug('Build an array ref with sessions info...');
|
||||||
@$activeSessions =
|
@$activeSessions =
|
||||||
map {
|
map {
|
||||||
my $epoch;
|
my $epoch;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user