Diff for /loncom/auth/switchserver.pm between versions 1.17 and 1.18

version 1.17, 2007/09/29 04:03:46 version 1.18, 2007/11/14 02:54:11
Line 42  sub init_env { Line 42  sub init_env {
  return  $env{'user.environment'};   return  $env{'user.environment'};
     }      }
     my $requrl=$r->uri;      my $requrl=$r->uri;
     my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));      my $handle= &Apache::lonnet::check_for_valid_session($r);
     my $lonid=$cookies{'lonID'};      if ($handle ne '') {
     my $cookie;  
     if (!$lonid) { return undef; }  
   
     my $handle=&LONCAPA::clean_handle($lonid->value);  
     my $lonidsdir=$r->dir_config('lonIDsDir');  
     if ((!-e "$lonidsdir/$handle.id") || ($handle eq '')) {  
  $r->log_reason("Cookie $handle not valid", $r->filename);   
  return undef;   return undef;
     }      }
       my $lonidsdir=$r->dir_config('lonIDsDir');
     &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle);      &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle);
           
     return $r->dir_config('lonIDsDir')."/$handle.id";      return $r->dir_config('lonIDsDir')."/$handle.id";

Removed from v.1.17  
changed lines
  Added in v.1.18


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