From f9c1e825729b11bc752d9063d4974aaf71ff5a5b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 30 Apr 2024 14:39:36 +0000 Subject: [PATCH] Bug 36575: (QA follow-up) Shibboleth POD and checkpw_internal call MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel de Rooy (cherry picked from commit 4cafd512cd31701fa3ee2a19abc4de4488b91e69) Signed-off-by: Frédéric Demians --- C4/Auth.pm | 4 ++-- C4/Auth_with_shibboleth.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e8dd400bfc..0eeb7845a5 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1981,8 +1981,8 @@ sub checkpw { # INTERNAL AUTH @return = checkpw_internal( $userid, $password, $no_set_userenv ); - $passwd_ok = 1 if $return[0] > 0; # 1 or 2 - $patron = $return[3]; + $passwd_ok = $return[0]; + $patron = $passwd_ok ? $return[3] : undef; } if ( defined $userid && !$patron ) { diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm index 16f02951bd..34e9c55108 100644 --- a/C4/Auth_with_shibboleth.pm +++ b/C4/Auth_with_shibboleth.pm @@ -409,7 +409,7 @@ This routine is NOT exported =head2 _autocreate - my ( $retval, $retcard, $retuserid ) = _autocreate( $config, $match ); + my ( $retval, $retcard, $retuserid, $patron ) = _autocreate( $config, $match, $patron ); Given a shibboleth attribute reference and a userid this internal routine will add the given user to Koha and return their user credentials. -- 2.39.5