--- loncom/auth/lonlogin.pm 2005/11/23 20:58:31 1.70 +++ loncom/auth/lonlogin.pm 2005/12/28 16:46:47 1.71 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.70 2005/11/23 20:58:31 www Exp $ +# $Id: lonlogin.pm,v 1.71 2005/12/28 16:46:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,9 +36,21 @@ use Apache::lonnet; use Apache::loncommon(); use Apache::lonauth(); use Apache::lonlocal; +use Apache::migrateuser(); sub handler { 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::lonlocal::get_language_handle($r); &Apache::loncommon::content_type($r,'text/html'); @@ -52,6 +64,7 @@ sub handler { return OK; } + # -------------------------------- Prevent users from attempting to login twice my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); my $lonid=$cookies{'lonID'}; @@ -89,10 +102,6 @@ ENDFAILED # ---------------------------------------------------- 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" if ($env{'form.domain'} eq 'public') { $env{'form.domain'}='';