From 66d3bf534c27826af171e0b05b72c89fba0104b3 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 Content-Type: text/plain; charset=utf-8 Signed-off-by: Marcel de Rooy Works as expected. The need for an additional check of pref WebBasedSelfCheck is merely theoretical. --- C4/Auth.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 9fb674ea59..1360ea7a18 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.20.1