|
Lines 238-249
sub get_template_and_user {
Link Here
|
| 238 |
} |
238 |
} |
| 239 |
|
239 |
|
| 240 |
my $borrowernumber; |
240 |
my $borrowernumber; |
|
|
241 |
my $patron; |
| 241 |
if ($user) { |
242 |
if ($user) { |
| 242 |
|
243 |
|
| 243 |
# It's possible for $user to be the borrowernumber if they don't have a |
244 |
# It's possible for $user to be the borrowernumber if they don't have a |
| 244 |
# userid defined (and are logging in through some other method, such |
245 |
# userid defined (and are logging in through some other method, such |
| 245 |
# as SSL certs against an email address) |
246 |
# as SSL certs against an email address) |
| 246 |
my $patron; |
|
|
| 247 |
$borrowernumber = getborrowernumber($user) if defined($user); |
247 |
$borrowernumber = getborrowernumber($user) if defined($user); |
| 248 |
if ( !defined($borrowernumber) && defined($user) ) { |
248 |
if ( !defined($borrowernumber) && defined($user) ) { |
| 249 |
$patron = Koha::Patrons->find( $user ); |
249 |
$patron = Koha::Patrons->find( $user ); |
|
Lines 610-615
sub get_template_and_user {
Link Here
|
| 610 |
PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), |
610 |
PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"), |
| 611 |
PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), |
611 |
PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), |
| 612 |
useDischarge => C4::Context->preference('useDischarge'), |
612 |
useDischarge => C4::Context->preference('useDischarge'), |
|
|
613 |
routing_lists_exist => ( $patron and $patron->get_routinglists ), |
| 613 |
); |
614 |
); |
| 614 |
|
615 |
|
| 615 |
$template->param( OpacPublic => '1' ) if ( $user || C4::Context->preference("OpacPublic") ); |
616 |
$template->param( OpacPublic => '1' ) if ( $user || C4::Context->preference("OpacPublic") ); |