--- loncom/interface/createaccount.pm 2020/09/08 19:38:59 1.81 +++ loncom/interface/createaccount.pm 2020/12/18 15:23:02 1.82 @@ -4,7 +4,7 @@ # kerberos, or SSO) or an e-mail address. Requests to use an e-mail address as # username may be processed automatically, or may be queued for approval. # -# $Id: createaccount.pm,v 1.81 2020/09/08 19:38:59 raeburn Exp $ +# $Id: createaccount.pm,v 1.82 2020/12/18 15:23:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -982,7 +982,8 @@ sub send_token { $msg .= '

'; return $msg; } - my %info = ('ip' => $ENV{'REMOTE_ADDR'}, + my $ip = &Apache::lonnet::get_requestor_ip(); + my %info = ('ip' => $ip, 'time' => $now, 'domain' => $domain, 'username' => $email, @@ -1098,8 +1099,9 @@ sub process_mailtoken { &create_account($r,$domain,$domdesc,\%data); if ($result eq 'ok') { $msg = $output; + my $ip = &Apache::lonnet::get_requestor_ip(); my $shownow = &Apache::lonlocal::locallocaltime($now); - my $mailmsg = &mt('A LON-CAPA account for the institution: [_1] has been created [_2] from IP address: [_3]. If you did not perform this action or authorize it, please contact the [_4] ([_5]).',$domdesc,$shownow,$ENV{'REMOTE_ADDR'},$contact_name,$contact_email)."\n"; + my $mailmsg = &mt('A LON-CAPA account for the institution: [_1] has been created [_2] from IP address: [_3]. If you did not perform this action or authorize it, please contact the [_4] ([_5]).',$domdesc,$shownow,$ip,$contact_name,$contact_email)."\n"; my $mailresult = &Apache::resetpw::send_mail($domdesc,$data{'email'}, $mailmsg,$contact_name, $contact_email); @@ -1578,7 +1580,8 @@ sub username_check { ''."\n". ''; my $now = time; - my %info = ('ip' => $ENV{'REMOTE_ADDR'}, + my $ip = &Apache::lonnet::get_requestor_ip(); + my %info = ('ip' => $ip, 'time' => $now, 'domain' => $domain, 'username' => $username);