Diff for /loncom/auth/lonauth.pm between versions 1.101 and 1.101.8.1

version 1.101, 2009/07/22 21:51:03 version 1.101.8.1, 2010/05/27 22:05:47
Line 209  sub handler { Line 209  sub handler {
 # -------------------------------- Prevent users from attempting to login twice  # -------------------------------- Prevent users from attempting to login twice
     my $handle = &Apache::lonnet::check_for_valid_session($r);      my $handle = &Apache::lonnet::check_for_valid_session($r);
     if ($handle ne '') {      if ($handle ne '') {
           my $lonidsdir=$r->dir_config('lonIDsDir');
           if ($handle=~/^publicuser\_/) {
   # For "public user" - remove it, we apparently really want to login
               unlink($r->dir_config('lonIDsDir')."/$handle.id");
           } else {
 # Indeed, a valid token is found  # Indeed, a valid token is found
  &Apache::loncommon::content_type($r,'text/html');              &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle);
  $r->send_http_header;              &Apache::loncommon::content_type($r,'text/html');
  my $start_page =               $r->send_http_header;
     &Apache::loncommon::start_page('Already logged in');              my $start_page =
  my $end_page =                   &Apache::loncommon::start_page('Already logged in');
     &Apache::loncommon::end_page();              my $end_page =
         $r->print(                  &Apache::loncommon::end_page();
            $start_page              my $dest = '/adm/roles';
           .'<h1>'.&mt('You are already logged in!').'</h1>'              if ($env{'form.firsturl'} ne '') {
           .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].'                  $dest = $env{'form.firsturl'};
                     ,'<a href="/adm/roles">','</a>','<a href="/adm/logout">','</a>')              }
           .'</p>'              $r->print(
           .'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'                 $start_page
           .$end_page                .'<h1>'.&mt('You are already logged in!').'</h1>'
         );                .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].'
         return OK;                      ,'<a href="'.$dest.'">','</a>','<a href="/adm/logout">','</a>')
                 .'</p>'
                 .$end_page
               );
               return OK;
           }
     }      }
   
 # ---------------------------------------------------- No valid token, continue  # ---------------------------------------------------- No valid token, continue

Removed from v.1.101  
changed lines
  Added in v.1.101.8.1


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