From 09e0799a8d617ba61e120576a6478465dc975aff 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 133cb03260..fd327bf618 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1080,7 +1080,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