From 694665050cf6885a8ec63764318c97d75ff9ed44 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 6 Jul 2021 14:48:51 +0200 Subject: [PATCH] Bug 28660: (bug 21325 follow-up) Fix auto self check Signed-off-by: Marcel de Rooy Works as expected. The need for an additional check of pref WebBasedSelfCheck is merely theoretical. Signed-off-by: David Cook Signed-off-by: Jonathan Druart --- C4/Auth.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 47c4ee1539..c98a65813a 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1085,7 +1085,14 @@ sub checkauth { else { my $retuserid; my $request_method = $query->request_method(); - if ($request_method eq 'POST'){ + + if ( + $request_method eq 'POST' + || ( C4::Context->preference('AutoSelfCheckID') + && $q_userid eq C4::Context->preference('AutoSelfCheckID') ) + ) + { + ( $return, $cardnumber, $retuserid, $cas_ticket ) = checkpw( $dbh, $q_userid, $password, $query, $type ); $userid = $retuserid if ($retuserid); -- 2.39.5