View | Details | Raw Unified | Return to bug 36937
Collapse All | Expand All

(-)a/Koha/REST/V1/Auth/Password.pm (-2 / +1 lines)
Lines 73-79 sub validate { Link Here
73
    return try {
73
    return try {
74
        my ( $status, $THE_cardnumber, $THE_userid, $patron ) = C4::Auth::checkpw( $identifier, $password );
74
        my ( $status, $THE_cardnumber, $THE_userid, $patron ) = C4::Auth::checkpw( $identifier, $password );
75
        unless ( $status && $status > 0 ) {
75
        unless ( $status && $status > 0 ) {
76
            my $error_response = $status == -2 ? 'Password expired' : 'Validation failed';
76
            my $error_response = ($status && $status == -2) ? 'Password expired' : 'Validation failed';
77
            return $c->render(
77
            return $c->render(
78
                status  => 400,
78
                status  => 400,
79
                openapi => { error => $error_response }
79
                openapi => { error => $error_response }
80
- 

Return to bug 36937