Diff for /loncom/auth/migrateuser.pm between versions 1.55 and 1.58

version 1.55, 2021/11/17 00:44:47 version 1.58, 2022/02/24 00:13:54
Line 706  sub handler { Line 706  sub handler {
         my ($handle,$expirepub);          my ($handle,$expirepub);
         $handle = &Apache::lonnet::check_for_valid_session($r);          $handle = &Apache::lonnet::check_for_valid_session($r);
   
 # For "public user" - remove any exising "public" cookie so actual user is ogged in.  # For "public user" - remove any existing "public" cookie so actual user is logged in.
         if ($handle) {          if ($handle) {
             if ($handle=~/^publicuser\_/) {              if ($handle=~/^publicuser\_/) {
                 my $lonidsdir=$r->dir_config('lonIDsDir');                  my $lonidsdir=$r->dir_config('lonIDsDir');
Line 722  sub handler { Line 722  sub handler {
      $handle);       $handle);
             my $checklaunch;              my $checklaunch;
             if ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) {              if ($data{'origurl'} =~ m{^/tiny/$match_domain/\w+$}) {
                 if ($env{'request.linkprot'} ne '') {                  unless ($env{'request.linkprot'} eq $data{'linkprot'}) {
                      unless ($env{'request.linkprot'} eq $data{'linkprot'}) {                      $checklaunch = 1;
                          $checklaunch = 1;  
                      }  
                 }                  }
                 if ($env{'request.linkkey'} ne '') {                  unless ($env{'request.linkkey'} eq $data{'linkkey'}) {
                     unless ($env{'request.linkkey'} eq $data{'linkkey'}) {                      $checklaunch = 1;
                         $checklaunch = 1;  
                     }  
                 }                  }
                 if ($env{'request.deeplink.login'}) {                  unless ($env{'request.deeplink.login'} eq $data{'deeplink.login'}) {
                     unless ($env{'request.deeplink.login'} eq $data{'deeplink.login'}) {                      $checklaunch = 1;
                         $checklaunch = 1;  
                     }  
                 }                  }
             }              }
             if ($data{'linkprot'} ne '') {              if ($data{'linkprot'} ne '') {
                   if (($env{'user.name'} ne $data{'username'}) ||
                       ($env{'user.domain'} ne $data{'domain'})) {
                       my %linkprot_env;
                       foreach my $item ('linkprot','deeplink.login') {
                           if ($data{$item}) {
                               $linkprot_env{'request.'.$item} = $data{$item};
                           }
                       }
                       &logout($r,$ip,$handle,\%data,\%linkprot_env);
                       return OK;
                   }
                 &Apache::lonnet::appenv({'request.linkprot' => $data{'linkprot'}});                  &Apache::lonnet::appenv({'request.linkprot' => $data{'linkprot'}});
                 if ($env{'request.linkkey'}) {                  if ($env{'request.linkkey'}) {
                     &Apache::lonnet::delenv('request.linkkey');                      &Apache::lonnet::delenv('request.linkkey');

Removed from v.1.55  
changed lines
  Added in v.1.58


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