Bug 35518: Follow-up for AutoSwitchPatron - clear $patron variable too

The AutoSwitchPatron clears the $borrowernumber variable to switch patrons.
With the AuthSwitchPatron block moved, the $patron variable still gets set,
and the patron doesn't get switched.  The clears the $patron variable too.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Michael Hafen 2024-02-15 11:21:28 -07:00 committed by Lucas Gass
parent fcb8bf21a5
commit d4553637e8
1 changed files with 1 additions and 0 deletions

View File

@ -131,6 +131,7 @@ if ( C4::Context->preference("AutoSwitchPatron") && $barcode ) {
$findborrower = $barcode;
undef $barcode;
undef $borrowernumber;
undef $patron;
$barcodes = [];
$autoswitched = 1;
}