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

Marcel de Rooy <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #58466|0                           |1
        is obsolete|                            |

--- Comment #2 from Marcel de Rooy <[email protected]> ---
Created attachment 58487
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58487&action=edit
Bug 17820: use ->find instead of search->next

>From C4::Auth:
  my $patron = Koha::Patrons->search({ userid => $userid })->next;

This should be replaced with
  my $patron = Koha::Patrons->find({ userid => $userid });

userid is a unique key

Caught with NYTProf:
 # spent 78.9ms making 1 call to Koha::Objects::next

Test plan:
Login at the intranet
Reload the page
=> You must still be logged in

Signed-off-by: Marcel de Rooy <[email protected]>
Tested by enabling TrackLastPatronActivity and logging in again.
Verified lastseen column in borrowers.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to