[Koha-bugs] [Bug 16711] OPAC Password recovery: Handling if multiple accounts have the same mail address

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 23 17:14:56 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16711

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick at bywatersolutions.com
             Status|Signed Off                  |Failed QA

--- Comment #13 from Nick Clemens <nick at bywatersolutions.com> ---
opac-password-recovery.pl:
$search_results = [ Koha::Patrons->search( { -or => { email => $email, emailpro
=> $email, B_email  => $email } } ) ];
$resultCount = Koha::Patrons->search( { -or => { email => $email, emailpro =>
$email, B_email  => $email } } ) -> count;

It seems we could just not get the results as an array and use count directly,
casting scalar seems unnecessary as well here

i.e.
$search_results = Koha::Patrons->search( { -or => { email => $email, emailpro
=> $email, B_email  => $email } } );
...
if ( not $search_results ) {
...
elsif ( $username && $search_results->count > 1)
...
etc.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list