| 1 | package Lemonldap::NG::Portal::Plugins::History; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 104 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 104 | ▶ | use Mouse; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 104 | ▶ | use Lemonldap::NG::Portal::Main::Constants qw( | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | PE_OK | ||||||||||||||
| 7 | PE_INFO | ||||||||||||||
| 8 | 104 | ); | |||||||||||||
| 9 | |||||||||||||||
| 10 | 104 | our $VERSION = '2.0.14'; | |||||||||||||
| 11 | |||||||||||||||
| 12 | 104 | extends qw( | |||||||||||||
| 13 | Lemonldap::NG::Portal::Main::Plugin | ||||||||||||||
| 14 | Lemonldap::NG::Portal::Lib::OtherSessions | ||||||||||||||
| 15 | ); | ||||||||||||||
| 16 | |||||||||||||||
| 17 | # INITIALIZATION | ||||||||||||||
| 18 | |||||||||||||||
| 19 | 104 | ▶ | use constant endAuth => 'run'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 20 | |||||||||||||||
| 21 | # RUNNING METHOD | ||||||||||||||
| 22 | |||||||||||||||
| 23 | 130 | ▶ | sub run { | ||||||||||||
|
Subroutine
run: called CC=5 SCAR=27.0
Pod
documented
| |||||||||||||||
| 24 | 130 | my ( $self, $req ) = @_; | |||||||||||||
| 25 | |||||||||||||||
| 26 | 130 | ▶ | if ( $req->param('checkLogins') ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 27 | 0 | $self->logger->debug('History asked'); | |||||||||||||
| 28 | $req->info( ( | ||||||||||||||
| 29 | $req->sessionInfo->{_loginHistory}->{successLogin} | ||||||||||||||
| 30 | ? $self->p->mkSessionArray( $req, | ||||||||||||||
| 31 | $req->sessionInfo->{_loginHistory}->{successLogin}, | ||||||||||||||
| 32 | 'lastLogins', 0, 0 ) | ||||||||||||||
| 33 | : "" | ||||||||||||||
| 34 | ) | ||||||||||||||
| 35 | . ("<hr>") | ||||||||||||||
| 36 | . ( | ||||||||||||||
| 37 | $req->sessionInfo->{_loginHistory}->{failedLogin} | ||||||||||||||
| 38 | ? $self->p->mkSessionArray( $req, | ||||||||||||||
| 39 | $req->sessionInfo->{_loginHistory}->{failedLogin}, | ||||||||||||||
| 40 | 0 | ▶ | 'lastFailedLogins', 0, 1 ) | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 41 | : "" | ||||||||||||||
| 42 | ) | ||||||||||||||
| 43 | ); | ||||||||||||||
| 44 | 0 | ▶ | $req->info( $self->loadTemplate( $req, 'noHistory' ) ) | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 45 | unless ( $req->info ); | ||||||||||||||
| 46 | 0 | return PE_INFO; | |||||||||||||
| 47 | } | ||||||||||||||
| 48 | 130 | return PE_OK; | |||||||||||||
| 49 | } | ||||||||||||||
| 50 | |||||||||||||||
| 51 | 104 | 1; | |||||||||||||