X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;ds=sidebyside;f=opac%2Fopac-userupdate.pl;h=f8273ce9c88c84dcd76cb6bf35b6bafd96b51485;hb=c5fe424c0f826a16caf3674b66df638d18bc6449;hp=aa5858a9f7318069090819c95c2a71e487d51f8c;hpb=21727e00f5238903edf94e2efc56d62aa42bed4c;p=koha_fer diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index aa5858a9f7..f8273ce9c8 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -48,6 +48,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( # get borrower information .... my ( $borr ) = GetMemberDetails( $borrowernumber ); +my ( $patronemail ) = GetFirstValidEmailAddress($borrowernumber); my $lib = GetBranchDetail($borr->{'branchcode'}); # handle the new information.... @@ -80,6 +81,10 @@ if ( !$updateemailaddress || $updateemailaddress eq '' ) { exit; } +if ( !$patronemail || $patronemail eq '' ) { + $patronemail = $updateemailaddress; +}; + if ( $query->param('modify') ) { # get all the fields: @@ -117,7 +122,7 @@ EOF $message .= "\n\nThanks,\nKoha\n\n"; my %mail = ( To => $updateemailaddress, - From => $updateemailaddress, + From => $patronemail, Subject => "User Request for update of Record.", Message => $message, 'Content-Type' => 'text/plain; charset="utf8"',