Bug Fixing Amazon.pm would not compile
[koha.git] / opac / opac-userupdate.pl
index 83fd4a5..cd126dd 100755 (executable)
@@ -18,7 +18,7 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
-require Exporter;
+
 use CGI;
 use Mail::Sendmail;
 
@@ -46,7 +46,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
 );
 
 # get borrower information ....
-my ( $borr, $flags ) = GetMemberDetails( $borrowernumber );
+my ( $borr ) = GetMemberDetails( $borrowernumber );
 my $lib = GetBranchDetail($borr->{'branchcode'});
 
 # handle the new information....
@@ -73,15 +73,14 @@ if ( $updateemailaddress eq '' ) {
     );
 
     $template->param(
-        errormessage => 'KohaAdminEmailAddress system preference
-    is not set.  Please visit the library to update your user record'
+        noadminemail => 1,
     );
 
     output_html_with_http_headers $query, $cookie, $template->output;
     exit;
 }
 
-if ( $query->{'modify'} ) {
+if ( $query->param('modify') ) {
 
     # get all the fields:
     my $message = <<"EOF";
@@ -118,7 +117,7 @@ EOF
 }
 
 $borr->{'dateenrolled'} = format_date( $borr->{'dateenrolled'} );
-$borr->{'expiry'}       = format_date( $borr->{'expiry'} );
+$borr->{'dateexpiry'}       = format_date( $borr->{'dateexpiry'} );
 $borr->{'dateofbirth'}  = format_date( $borr->{'dateofbirth'} );
 $borr->{'ethnicity'}    = fixEthnicity( $borr->{'ethnicity'} );