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

(-)a/C4/ILSDI/Services.pm (-1 / +1 lines)
Lines 357-363 sub AuthenticatePatron { Link Here
357
    my ($status, $cardnumber, $userid) = C4::Auth::checkpw( C4::Context->dbh, $username, $password );
357
    my ($status, $cardnumber, $userid) = C4::Auth::checkpw( C4::Context->dbh, $username, $password );
358
    if ( $status ) {
358
    if ( $status ) {
359
        # Get the borrower
359
        # Get the borrower
360
        my $patron = Koha::Patrons->find( { cardnumber => $cardnumber } );
360
        my $patron = Koha::Patrons->find( { userid => $userid } );
361
        return { id => $patron->borrowernumber };
361
        return { id => $patron->borrowernumber };
362
    }
362
    }
363
    else {
363
    else {
(-)a/t/db_dependent/ILSDI_Services.t (-1 / +8 lines)
Lines 42-50 subtest 'AuthenticatePatron test' => sub { Link Here
42
42
43
    my $plain_password = 'tomasito';
43
    my $plain_password = 'tomasito';
44
44
45
    $builder->build({
46
        source => 'Borrower',
47
        value => {
48
            cardnumber => undef,
49
        }
50
    });
51
45
    my $borrower = $builder->build({
52
    my $borrower = $builder->build({
46
        source => 'Borrower',
53
        source => 'Borrower',
47
        value  => {
54
        value  => {
55
            cardnumber => undef,
48
            password => Koha::AuthUtils::hash_password( $plain_password )
56
            password => Koha::AuthUtils::hash_password( $plain_password )
49
        }
57
        }
50
    });
58
    });
51
- 

Return to bug 21046