|
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_context ) = @_; |
| 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_context) |
| 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_context; |
| 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_context; |
| 1829 |
return 1, $cardnumber, $userid; |
1829 |
return 1, $cardnumber, $userid; |
| 1830 |
} |
1830 |
} |
| 1831 |
} |
1831 |
} |