diff --git a/Koha/REST/V1/Auth/Password.pm b/Koha/REST/V1/Auth/Password.pm index 9889bf45a7..189dcc80d5 100644 --- a/Koha/REST/V1/Auth/Password.pm +++ b/Koha/REST/V1/Auth/Password.pm @@ -71,7 +71,7 @@ sub validate { my $password = $body->{password} // ""; return try { - my ( $status, $THE_cardnumber, $THE_userid ) = C4::Auth::checkpw( $identifier, $password ); + my ( $status, $THE_cardnumber, $THE_userid, $patron ) = C4::Auth::checkpw( $identifier, $password ); unless ( $status && $status > 0 ) { my $error_response = $status == -2 ? 'Password expired' : 'Validation failed'; return $c->render( @@ -80,8 +80,6 @@ sub validate { ); } - my $patron = Koha::Patrons->find( { cardnumber => $THE_cardnumber } ); - return $c->render( status => 201, openapi => {