|
Lines 902-911
sub is_going_to_expire {
Link Here
|
| 902 |
|
902 |
|
| 903 |
=head3 set_password |
903 |
=head3 set_password |
| 904 |
|
904 |
|
| 905 |
$patron->set_password({ password => $plain_text_password [, skip_validation => 1 ] }); |
905 |
$patron->set_password({ password => $plain_text_password [, skip_validation => 1, action => NAME ] }); |
| 906 |
|
906 |
|
| 907 |
Set the patron's password. |
907 |
Set the patron's password. |
| 908 |
|
908 |
|
|
|
909 |
Allows optional action parameter to change name of action logged (when enabled). Used for reset password. |
| 910 |
|
| 909 |
=head4 Exceptions |
911 |
=head4 Exceptions |
| 910 |
|
912 |
|
| 911 |
The passed string is validated against the current password enforcement policy. |
913 |
The passed string is validated against the current password enforcement policy. |
|
Lines 931-936
sub set_password {
Link Here
|
| 931 |
my ( $self, $args ) = @_; |
933 |
my ( $self, $args ) = @_; |
| 932 |
|
934 |
|
| 933 |
my $password = $args->{password}; |
935 |
my $password = $args->{password}; |
|
|
936 |
my $action = $args->{action} || "CHANGE PASS"; |
| 934 |
|
937 |
|
| 935 |
unless ( $args->{skip_validation} ) { |
938 |
unless ( $args->{skip_validation} ) { |
| 936 |
my ( $is_valid, $error ) = Koha::AuthUtils::is_password_valid( $password, $self->category ); |
939 |
my ( $is_valid, $error ) = Koha::AuthUtils::is_password_valid( $password, $self->category ); |
|
Lines 1019-1025
sub set_password {
Link Here
|
| 1019 |
$self->login_attempts(0); |
1022 |
$self->login_attempts(0); |
| 1020 |
$self->SUPER::store; |
1023 |
$self->SUPER::store; |
| 1021 |
|
1024 |
|
| 1022 |
logaction( "MEMBERS", "CHANGE PASS", $self->borrowernumber, "" ) |
1025 |
logaction( "MEMBERS", $action, $self->borrowernumber, "" ) |
| 1023 |
if C4::Context->preference("BorrowersLog"); |
1026 |
if C4::Context->preference("BorrowersLog"); |
| 1024 |
|
1027 |
|
| 1025 |
return $self; |
1028 |
return $self; |