@@ -, +, @@ --- Koha/REST/V1/Auth.pm | 1 + 1 file changed, 1 insertion(+) --- a/Koha/REST/V1/Auth.pm +++ a/Koha/REST/V1/Auth.pm @@ -447,6 +447,7 @@ sub _basic_auth { my ( $user_id, $password ) = split( /:/, $decoded_credentials, 2 ); my $dbh = C4::Context->dbh; + C4::Context->_new_userenv($user_id) unless defined C4::Context->userenv; unless ( checkpw_internal($dbh, $user_id, $password ) ) { Koha::Exceptions::Authorization::Unauthorized->throw( error => 'Invalid password' ); } --