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

(-)a/C4/Auth.pm (-4 / +4 lines)
Lines 1734-1740 sub get_session { Link Here
1734
}
1734
}
1735
1735
1736
sub checkpw {
1736
sub checkpw {
1737
    my ( $dbh, $userid, $password, $query, $type ) = @_;
1737
    my ( $dbh, $userid, $password, $query, $type, $no_set_userenv ) = @_;
1738
    $type = 'opac' unless $type;
1738
    $type = 'opac' unless $type;
1739
    if ($ldap) {
1739
    if ($ldap) {
1740
        $debug and print STDERR "## checkpw - checking LDAP\n";
1740
        $debug and print STDERR "## checkpw - checking LDAP\n";
Lines 1774-1780 sub checkpw { Link Here
1774
    }
1774
    }
1775
1775
1776
    # INTERNAL AUTH
1776
    # INTERNAL AUTH
1777
    return checkpw_internal(@_)
1777
    return checkpw_internal( $dbh, $userid, $password, $no_set_userenv)
1778
}
1778
}
1779
1779
1780
sub checkpw_internal {
1780
sub checkpw_internal {
Lines 1808-1814 sub checkpw_internal { Link Here
1808
        if ( checkpw_hash( $password, $stored_hash ) ) {
1808
        if ( checkpw_hash( $password, $stored_hash ) ) {
1809
1809
1810
            C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber,
1810
            C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber,
1811
                $firstname, $surname, $branchcode, $branchname, $flags );
1811
                $firstname, $surname, $branchcode, $branchname, $flags ) unless $no_set_userenv;
1812
            return 1, $cardnumber, $userid;
1812
            return 1, $cardnumber, $userid;
1813
        }
1813
        }
1814
    }
1814
    }
Lines 1825-1831 sub checkpw_internal { Link Here
1825
        if ( checkpw_hash( $password, $stored_hash ) ) {
1825
        if ( checkpw_hash( $password, $stored_hash ) ) {
1826
1826
1827
            C4::Context->set_userenv( $borrowernumber, $userid, $cardnumber,
1827
            C4::Context->set_userenv( $borrowernumber, $userid, $cardnumber,
1828
                $firstname, $surname, $branchcode, $branchname, $flags );
1828
                $firstname, $surname, $branchcode, $branchname, $flags ) unless $no_set_userenv;
1829
            return 1, $cardnumber, $userid;
1829
            return 1, $cardnumber, $userid;
1830
        }
1830
        }
1831
    }
1831
    }
(-)a/C4/SIP/ILS/Patron.pm (-2 / +1 lines)
Lines 201-207 sub check_password { Link Here
201
201
202
    my $dbh = C4::Context->dbh;
202
    my $dbh = C4::Context->dbh;
203
    my $ret = 0;
203
    my $ret = 0;
204
    ($ret) = checkpw( $dbh, $self->{userid}, $pwd );
204
    ($ret) = checkpw( $dbh, $self->{userid}, $pwd, my $query, my $type, my $no_set_userenv = 1 );
205
    return $ret;
205
    return $ret;
206
}
206
}
207
207
208
- 

Return to bug 16492