Diff for /loncom/auth/lonlogin.pm between versions 1.70 and 1.72

version 1.70, 2005/11/23 20:58:31 version 1.72, 2006/02/28 16:42:42
Line 36  use Apache::lonnet; Line 36  use Apache::lonnet;
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonauth();  use Apache::lonauth();
 use Apache::lonlocal;  use Apache::lonlocal;
   use Apache::migrateuser();
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
   
       &Apache::loncommon::get_unprocessed_cgi
    ($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'},
    ['interface','username','domain','firsturl','localpath','localres',
     'token']);
   
   # -- check if they are a migrating user
       if (defined($env{'form.token'})) {
    return &Apache::migrateuser::handler($r);
       }
   
     &Apache::loncommon::no_cache($r);      &Apache::loncommon::no_cache($r);
     &Apache::lonlocal::get_language_handle($r);      &Apache::lonlocal::get_language_handle($r);
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
Line 52  sub handler { Line 64  sub handler {
  return OK;   return OK;
     }      }
   
   
 # -------------------------------- Prevent users from attempting to login twice  # -------------------------------- Prevent users from attempting to login twice
     my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));      my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));
     my $lonid=$cookies{'lonID'};      my $lonid=$cookies{'lonID'};
Line 89  ENDFAILED Line 102  ENDFAILED
   
 # ---------------------------------------------------- No valid token, continue  # ---------------------------------------------------- No valid token, continue
   
     &Apache::loncommon::get_unprocessed_cgi  
      ($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'},  
       ['interface','username','domain','firsturl','localpath','localres']);  
   
  # ---------------------------- Not possible to really login to domain "public"   # ---------------------------- Not possible to really login to domain "public"
     if ($env{'form.domain'} eq 'public') {      if ($env{'form.domain'} eq 'public') {
  $env{'form.domain'}='';   $env{'form.domain'}='';
Line 120  ENDFAILED Line 129  ENDFAILED
     my $domain  = $r->dir_config('lonDefDomain');      my $domain  = $r->dir_config('lonDefDomain');
     my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0];      my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0];
     foreach my $posdom (&Apache::lonnet::current_machine_domains()) {      foreach my $posdom (&Apache::lonnet::current_machine_domains()) {
  if ($posdom eq $testdomain) { $domain=$testdomain; }   if (lc($posdom) eq lc($testdomain)) { $domain=$posdomain; }
     }      }
     if (($env{'form.domain'}) &&       if (($env{'form.domain'}) && 
  ($Apache::lonnet::domaindescription{$env{'form.domain'}})) {   ($Apache::lonnet::domaindescription{$env{'form.domain'}})) {

Removed from v.1.70  
changed lines
  Added in v.1.72


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