Account identification with this email address only is ambiguous.
<br />Please use the field 'Login' as well.
[% ELSIF (errAlreadyStartRecovery) %]
- The process of password recovery has already been started for this account ("<strong>[% username %]</strong>")
+ The process of password recovery has already been started for this account
+ [% IF username %]
+ ("<strong>[% username %]</strong>")
+ [% ELSIF email %]
+ ("<strong>[% email %]</strong>")
+ [% END %]
<br/>You should have received an email with a link to reset your password.
<br/>If you did not receive this email, you can request a new one: <a href="/cgi-bin/koha/opac-password-recovery.pl?resendEmail=true&email=[% email %]&username=[% username %]">Get new password recovery link</a>
[% ELSIF (errPassNotMatch) %]
my $minPassLength = C4::Context->preference('minPasswordLength');
my $id = $query->param('id');
my $uniqueKey = $query->param('uniqueKey');
-my $username = $query->param('username');
+my $username = $query->param('username') // q{};
my $borrower_number;
#errors
if ( $query->param('sendEmail') || $query->param('resendEmail') ) {
#try with the main email
- $email ||= ''; # avoid undef
my $borrower;
my $search_results;
$search_results = Koha::Patrons->search( { -or => { email => $email, emailpro => $email, B_email => $email } } );
}
- if ( not $search_results || $search_results->count < 1) {
+ if ( !defined $search_results || $search_results->count < 1) {
$hasError = 1;
$errNoBorrowerFound = 1;
}
$errMultipleAccountsForEmail = 1;
}
elsif ( $borrower = $search_results->next() ) { # One matching borrower
- $username ||= $borrower->userid;
my @emails = ( $borrower->email, $borrower->emailpro, $borrower->B_email );
my $firstNonEmptyEmail = '';
$errNoBorrowerFound = 1;
}
-# If we dont have an email yet. Get one of the borrower's email or raise an error.
- elsif ( !$email && !( $email = $firstNonEmptyEmail ) ) {
+ # If there is no given email, and there is no email on record
+ elsif ( !$email && !$firstNonEmptyEmail ) {
$hasError = 1;
$errNoBorrowerEmail = 1;
}