Lines 208-219
sub get_template_and_user {
Link Here
|
208 |
} |
208 |
} |
209 |
|
209 |
|
210 |
my $borrowernumber; |
210 |
my $borrowernumber; |
|
|
211 |
my $patron; |
211 |
if ($user) { |
212 |
if ($user) { |
212 |
|
213 |
|
213 |
# It's possible for $user to be the borrowernumber if they don't have a |
214 |
# It's possible for $user to be the borrowernumber if they don't have a |
214 |
# userid defined (and are logging in through some other method, such |
215 |
# userid defined (and are logging in through some other method, such |
215 |
# as SSL certs against an email address) |
216 |
# as SSL certs against an email address) |
216 |
my $patron; |
|
|
217 |
$borrowernumber = getborrowernumber($user) if defined($user); |
217 |
$borrowernumber = getborrowernumber($user) if defined($user); |
218 |
if ( !defined($borrowernumber) && defined($user) ) { |
218 |
if ( !defined($borrowernumber) && defined($user) ) { |
219 |
$patron = Koha::Patrons->find( $user ); |
219 |
$patron = Koha::Patrons->find( $user ); |
Lines 582-587
sub get_template_and_user {
Link Here
|
582 |
PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), |
582 |
PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), |
583 |
PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), |
583 |
PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), |
584 |
useDischarge => C4::Context->preference('useDischarge'), |
584 |
useDischarge => C4::Context->preference('useDischarge'), |
|
|
585 |
routing_lists_exist => ( $patron and $patron->get_routinglists ), |
585 |
); |
586 |
); |
586 |
|
587 |
|
587 |
$template->param( OpacPublic => '1' ) if ( $user || C4::Context->preference("OpacPublic") ); |
588 |
$template->param( OpacPublic => '1' ) if ( $user || C4::Context->preference("OpacPublic") ); |