Diff for /loncom/interface/resetpw.pm between versions 1.48 and 1.49

version 1.48, 2020/12/18 15:23:02 version 1.49, 2021/05/04 18:47:36
Line 300  END Line 300  END
             $output = &invalid_state('baddomain',$domdesc,              $output = &invalid_state('baddomain',$domdesc,
                                      $contact_name,$contact_email);                                        $contact_name,$contact_email); 
         } elsif ($otherinst) {          } elsif ($otherinst) {
             ($header,$output) = &homeserver_redirect($uname,$udom,$domdesc,$brcrum);              ($header,$output) = &homeserver_redirect($r,$uname,$udom,$domdesc,$brcrum);
         } elsif (($uname) || ($useremail)) {          } elsif (($uname) || ($useremail)) {
             my $earlyout;              my $earlyout;
             unless ($passwdconf{'captcha'} eq 'unused') {              unless ($passwdconf{'captcha'} eq 'unused') {
Line 579  sub invalid_state { Line 579  sub invalid_state {
 }  }
   
 sub homeserver_redirect {  sub homeserver_redirect {
     my ($uname,$udom,$domdesc,$brcrum) = @_;      my ($r,$uname,$udom,$domdesc,$brcrum) = @_;
     my $uhome;      my $uhome;
     if (($uname ne '') && ($udom ne '')) {      if (($uname ne '') && ($udom ne '')) {
         $uhome = &Apache::lonnet::homeserver($uname,$udom);          $uhome = &Apache::lonnet::homeserver($uname,$udom);
Line 590  sub homeserver_redirect { Line 590  sub homeserver_redirect {
     my $hostname = &Apache::lonnet::hostname($uhome);      my $hostname = &Apache::lonnet::hostname($uhome);
     my $protocol = $Apache::lonnet::protocol{$uhome};      my $protocol = $Apache::lonnet::protocol{$uhome};
     $protocol = 'http' if ($protocol ne 'https');      $protocol = 'http' if ($protocol ne 'https');
       my $alias = &Apache::lonnet::use_proxy_alias($r,$uhome);
       $hostname = $alias if ($alias ne '');
     my $url = $protocol.'://'.$hostname.'/adm/resetpw';      my $url = $protocol.'://'.$hostname.'/adm/resetpw';
     # Breadcrumbs      # Breadcrumbs
     my $start_page = &Apache::loncommon::start_page('Switching Server',undef,      my $start_page = &Apache::loncommon::start_page('Switching Server',undef,
Line 755  sub reset_passwd { Line 757  sub reset_passwd {
                         my $hostname = &Apache::lonnet::hostname($homeserver);                          my $hostname = &Apache::lonnet::hostname($homeserver);
                         my $protocol = $Apache::lonnet::protocol{$homeserver};                          my $protocol = $Apache::lonnet::protocol{$homeserver};
                         $protocol = 'http' if ($protocol ne 'https');                          $protocol = 'http' if ($protocol ne 'https');
                           my $alias = &Apache::lonnet::use_proxy_alias($r,$homeserver);
                           $hostname = $alias if ($alias ne '');
                         my $url = $protocol.'://'.$hostname.'/adm/resetpw';                          my $url = $protocol.'://'.$hostname.'/adm/resetpw';
                         my ($opentag,$closetag);                          my ($opentag,$closetag);
                         if ($url) {                          if ($url) {

Removed from v.1.48  
changed lines
  Added in v.1.49


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>