Lines 45-50
use List::MoreUtils qw/ any /;
Link Here
|
45 |
use Encode qw( encode is_utf8); |
45 |
use Encode qw( encode is_utf8); |
46 |
use C4::Auth_with_shibboleth; |
46 |
use C4::Auth_with_shibboleth; |
47 |
use Net::CIDR; |
47 |
use Net::CIDR; |
|
|
48 |
use C4::Log qw/logaction/; |
48 |
|
49 |
|
49 |
# use utf8; |
50 |
# use utf8; |
50 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout); |
51 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout); |
Lines 1855-1860
sub checkpw {
Link Here
|
1855 |
$patron->update({ login_attempts => $patron->login_attempts + 1 }); |
1856 |
$patron->update({ login_attempts => $patron->login_attempts + 1 }); |
1856 |
} |
1857 |
} |
1857 |
} |
1858 |
} |
|
|
1859 |
|
1860 |
# Optionally log success or failure |
1861 |
if( $patron && $passwd_ok && C4::Context->preference('AuthSuccessLog') ) { |
1862 |
logaction( 'AUTH', 'SUCCESS', $patron->id, "Valid password for $userid", $type ); |
1863 |
} elsif( !$passwd_ok && C4::Context->preference('AuthFailureLog') ) { |
1864 |
logaction( 'AUTH', 'FAILURE', 0, "Wrong password for $userid", $type ); |
1865 |
} |
1866 |
|
1858 |
return @return; |
1867 |
return @return; |
1859 |
} |
1868 |
} |
1860 |
|
1869 |
|
1861 |
- |
|
|