merged in changes from the rel-1-2 branch into the main branch. Some of the default...
[koha.git] / opac / opac-userdetails.pl
1 #!/usr/bin/perl
2 use strict;
3 require Exporter;
4 use CGI;
5
6 use C4::Auth;
7 use C4::Koha;
8 use C4::Circulation::Circ2;
9 use C4::Search;
10
11 my $query = new CGI;
12 my ($template, $borrowernumber, $cookie) 
13     = get_template_and_user({template_name => "opac-userdetails.tmpl",
14                              query => $query,
15                              type => "opac",
16                              authnotrequired => 0,
17                              flagsrequired => {borrow => 1},
18                              debug => 1,
19                              });
20
21 # get borrower information ....
22 my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
23
24 $borr->{'dateenrolled'} = slashifyDate($borr->{'dateenrolled'});
25 $borr->{'expiry'}       = slashifyDate($borr->{'expiry'});
26 $borr->{'dateofbirth'}  = slashifyDate($borr->{'dateofbirth'});
27 $borr->{'ethnicity'}    = fixEthnicity($borr->{'ethnicity'});
28
29
30 $template->param($borr);
31
32 print $query->header(-cookie => $cookie), $template->output;
33