@@ -, +, @@ --- C4/Passwordrecovery.pm | 2 +- Koha/SMS/Provider.pm | 4 ++-- opac/opac-password-recovery.pl | 6 +++--- t/db_dependent/Passwordrecovery.t | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) --- a/C4/Passwordrecovery.pm +++ a/C4/Passwordrecovery.pm @@ -103,7 +103,7 @@ sub GetValidLinkInfo { =cut sub SendPasswordRecoveryEmail { - my $borrower = shift; # Koha::Borrower + my $borrower = shift; # Koha::Patron my $userEmail = shift; #to_address (the one specified in the request) my $update = shift; --- a/Koha/SMS/Provider.pm +++ a/Koha/SMS/Provider.pm @@ -21,7 +21,7 @@ use Modern::Perl; use Carp; -use Koha::Borrowers; +use Koha::Patrons; use base qw(Koha::Object); @@ -47,7 +47,7 @@ Gives the number of patrons using this provider sub patrons_using { my ( $self ) = @_; - return Koha::Borrowers->search( { sms_provider_id => $self->id } )->count(); + return Koha::Patrons->search( { sms_provider_id => $self->id } )->count(); } =head3 _type --- a/opac/opac-password-recovery.pl +++ a/opac/opac-password-recovery.pl @@ -11,7 +11,7 @@ use C4::Context; use C4::Passwordrecovery qw(SendPasswordRecoveryEmail ValidateBorrowernumber GetValidLinkInfo CompletePasswordRecovery); use Koha::AuthUtils qw(hash_password); -use Koha::Borrowers; +use Koha::Patrons; my $query = new CGI; use HTML::Entities; @@ -58,10 +58,10 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { # Find the borrower by his userid or email if ($username) { - $search_results = [ Koha::Borrowers->search( { userid => $username } ) ]; + $search_results = [ Koha::Patrons->search( { userid => $username } ) ]; } elsif ($email) { - $search_results = [ Koha::Borrowers->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ) ]; + $search_results = [ Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email } } ) ]; } if ( not $search_results || scalar @$search_results > 1 ) { $hasError = 1; --- a/t/db_dependent/Passwordrecovery.t +++ a/t/db_dependent/Passwordrecovery.t @@ -20,7 +20,7 @@ use Modern::Perl; use C4::Context; use C4::Letters; use Koha::Database; -use Koha::Borrowers; +use Koha::Patrons; use Test::More tests => 16; @@ -134,7 +134,7 @@ ok( C4::Passwordrecovery::CompletePasswordRecovery($uuid2) == 0, "[CompletePassw # C4::Passwordrecovery::SendPasswordRecoveryEmail # ################################################### -my $borrower = shift [ Koha::Borrowers->search( { userid => $userid1 } ) ]; +my $borrower = shift [ Koha::Patrons->search( { userid => $userid1 } ) ]; ok( C4::Passwordrecovery::SendPasswordRecoveryEmail($borrower, $email1, 0) == 1, "[SendPasswordRecoveryEmail] Returns 1 on success" ); my $letters = C4::Letters::GetQueuedMessages( { borrowernumber => $borrowernumber1, limit => 99 } ); ok( scalar @$letters == 1, "[SendPasswordRecoveryEmail] There is a letter in the queue for our borrower"); --