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

version 1.67, 2005/06/14 20:09:13 version 1.70, 2005/11/23 20:58:31
Line 60  sub handler { Line 60  sub handler {
  my $handle=$lonid->value;   my $handle=$lonid->value;
         $handle=~s/\W//g;          $handle=~s/\W//g;
         my $lonidsdir=$r->dir_config('lonIDsDir');          my $lonidsdir=$r->dir_config('lonIDsDir');
         if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {   if (-e "$lonidsdir/$handle.id") {
   # Is there an existing token file?
       if ($handle=~/^publicuser\_/) {
   # For "public user" - remove it, we apparently really want to login
    unlink("$lonidsdir/$handle.id");
       } elsif ($handle ne '') {
 # Indeed, a valid token is found  # Indeed, a valid token is found
     my $bodytag=&Apache::loncommon::bodytag('Already logged in');   my $bodytag=&Apache::loncommon::bodytag('Already logged in');
     $r->print(<<ENDFAILED);   $r->print(<<ENDFAILED);
 <html>  <html>
 <head>  <head>
 <title>Already logged in</title>  <title>Already logged in</title>
Line 77  $bodytag Line 82  $bodytag
 </body>  </body>
 </html>  </html>
 ENDFAILED  ENDFAILED
            return OK;                  return OK;
        }  
  }   }
     }      }
   
Line 86  ENDFAILED Line 92  ENDFAILED
     &Apache::loncommon::get_unprocessed_cgi      &Apache::loncommon::get_unprocessed_cgi
      ($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'},       ($ENV{'QUERY_STRING'}.'&'.$env{'request.querystring'},
       ['interface','username','domain','firsturl','localpath','localres']);        ['interface','username','domain','firsturl','localpath','localres']);
    
   
    # ---------------------------- Not possible to really login to domain "public"
       if ($env{'form.domain'} eq 'public') {
    $env{'form.domain'}='';
    $env{'form.username'}='';
       }
 # ----------------------------------------------------------- Process Interface  # ----------------------------------------------------------- Process Interface
     $env{'form.interface'}=~s/\W//g;      $env{'form.interface'}=~s/\W//g;
   
Line 108  ENDFAILED Line 118  ENDFAILED
     my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':'.$port_to_use.      my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':'.$port_to_use.
                   $r->dir_config('lonIconsURL');                    $r->dir_config('lonIconsURL');
     my $domain  = $r->dir_config('lonDefDomain');      my $domain  = $r->dir_config('lonDefDomain');
       my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0];
       foreach my $posdom (&Apache::lonnet::current_machine_domains()) {
    if ($posdom eq $testdomain) { $domain=$testdomain; }
       }
     if (($env{'form.domain'}) &&       if (($env{'form.domain'}) && 
  ($Apache::lonnet::domaindescription{$env{'form.domain'}})) {   ($Apache::lonnet::domaindescription{$env{'form.domain'}})) {
  $domain=$env{'form.domain'};   $domain=$env{'form.domain'};

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


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