View | Details | Raw Unified | Return to bug 21431
Collapse All | Expand All

(-)a/Koha/Patron.pm (-2 / +5 lines)
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;
(-)a/opac/opac-password-recovery.pl (-2 / +1 lines)
Lines 162-168 elsif ( $query->param('passwordReset') ) { Link Here
162
        $min_password_length = $borrower->category->effective_min_password_length;
162
        $min_password_length = $borrower->category->effective_min_password_length;
163
        $require_strong_password = $borrower->category->effective_require_strong_password;
163
        $require_strong_password = $borrower->category->effective_require_strong_password;
164
        try {
164
        try {
165
            $borrower->set_password({ password => $password });
165
            $borrower->set_password({ password => $password, action => 'RESET PASS' });
166
166
167
            CompletePasswordRecovery($uniqueKey);
167
            CompletePasswordRecovery($uniqueKey);
168
            $template->param(
168
            $template->param(
169
- 

Return to bug 21431