--- loncom/auth/lonauth.pm 2010/05/23 21:20:11 1.101.4.2 +++ loncom/auth/lonauth.pm 2010/03/10 21:25:29 1.102 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.101.4.2 2010/05/23 21:20:11 raeburn Exp $ +# $Id: lonauth.pm,v 1.102 2010/03/10 21:25:29 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -111,21 +111,17 @@ sub success { } } - my $windowinfo=&Apache::lonmenu::open($env{'browser.os'}); - my $startupremote=&Apache::lonmenu::startupremote($destination); - my $remoteinfo=&Apache::lonmenu::load_remote_msg($lowerurl); - my $setflags=&Apache::lonmenu::setflags(); - my $maincall=&Apache::lonmenu::maincall(); + my $windowinfo = Apache::lonhtmlcommon::scripttag('self.name="loncapaclient";'); + my $header = ''; + my $brcrum = [{'href' => '', + 'text' => 'Successful Login'},]; my $start_page=&Apache::loncommon::start_page('Successful Login', - $startupremote, - {'no_inline_link' => 1,}); + $header, + {'no_inline_link' => 1, + 'bread_crumbs' => $brcrum,}); my $end_page =&Apache::loncommon::end_page(); - my $continuelink; - if (($env{'browser.interface'} eq 'textual') || - ($env{'environment.remote'} eq 'off')) { - $continuelink=''.&mt('Continue').''; - } + my $continuelink=''.&mt('Continue').''; # ------------------------------------------------- Output for successful login &Apache::loncommon::content_type($r,'text/html'); @@ -140,13 +136,10 @@ sub success { ); $r->print(<$lt{'wel'} $lt{'mes'}

$lt{'pro'}

-$remoteinfo -$maincall $continuelink $end_page ENDSUCCESS @@ -207,33 +200,23 @@ sub handler { # -------------------------------- Prevent users from attempting to login twice my $handle = &Apache::lonnet::check_for_valid_session($r); 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 - &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); - &Apache::loncommon::content_type($r,'text/html'); - $r->send_http_header; - my $start_page = - &Apache::loncommon::start_page('Already logged in'); - my $end_page = - &Apache::loncommon::end_page(); - my $dest = '/adm/roles'; - if ($env{'form.firsturl'} ne '') { - $dest = $env{'form.firsturl'}; - } - $r->print( - $start_page - .'

'.&mt('You are already logged in!').'

' - .'

'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].' - ,'','','','') - .'

' - .$end_page - ); - return OK; - } + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + my $start_page = + &Apache::loncommon::start_page('Already logged in'); + my $end_page = + &Apache::loncommon::end_page(); + $r->print( + $start_page + .'

'.&mt('You are already logged in!').'

' + .'

'.&mt('Please either [_1]continue the current session[_2] or [_3]log out[_4].' + ,'','','','') + .'

' + .'

'.&mt('Login problems?').'

' + .$end_page + ); + return OK; } # ---------------------------------------------------- No valid token, continue