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 1869-1874
sub checkpw {
Link Here
|
1869 |
$patron->update({ login_attempts => $patron->login_attempts + 1 }); |
1870 |
$patron->update({ login_attempts => $patron->login_attempts + 1 }); |
1870 |
} |
1871 |
} |
1871 |
} |
1872 |
} |
|
|
1873 |
|
1874 |
# Optionally log success or failure |
1875 |
if( $patron && $passwd_ok && C4::Context->preference('AuthSuccessLog') ) { |
1876 |
logaction( 'AUTH', 'SUCCESS', $patron->id, "Valid password for $userid", $type ); |
1877 |
} elsif( !$passwd_ok && C4::Context->preference('AuthFailureLog') ) { |
1878 |
logaction( 'AUTH', 'FAILURE', 0, "Wrong password for $userid", $type ); |
1879 |
} |
1880 |
|
1872 |
return @return; |
1881 |
return @return; |
1873 |
} |
1882 |
} |
1874 |
|
1883 |
|
1875 |
- |
|
|