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

(-)a/Koha/REST/V1/Auth/Password.pm (-4 / +1 lines)
Lines 71-77 sub validate { Link Here
71
    my $password = $body->{password} // "";
71
    my $password = $body->{password} // "";
72
72
73
    return try {
73
    return try {
74
        my ( $status, $THE_cardnumber, $THE_userid ) = 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 == -2 ? 'Password expired' : 'Validation failed';
77
            return $c->render(
77
            return $c->render(
Lines 80-87 sub validate { Link Here
80
            );
80
            );
81
        }
81
        }
82
82
83
        my $patron = Koha::Patrons->find( { cardnumber => $THE_cardnumber } );
84
85
        return $c->render(
83
        return $c->render(
86
            status  => 201,
84
            status  => 201,
87
            openapi => {
85
            openapi => {
88
- 

Return to bug 34893