--- loncom/auth/lonauth.pm 2010/08/26 08:15:59 1.101.8.4 +++ loncom/auth/lonauth.pm 2010/09/24 00:01:44 1.101.8.5 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.101.8.4 2010/08/26 08:15:59 raeburn Exp $ +# $Id: lonauth.pm,v 1.101.8.5 2010/09/24 00:01:44 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -362,7 +362,9 @@ sub handler { &Apache::lonnet::get_dom('configuration',['usercreation'],$form{'udom'}); if (grep(/^login$/,@cancreate)) { my $domdesc = &Apache::lonnet::domain($form{'udom'},'description'); - &check_can_host($r,\%form,'no_account_on_host',$domdesc); + unless (&check_can_host($r,\%form,'no_account_on_host',$domdesc)) { + return OK; + } my $start_page = &Apache::loncommon::start_page('Create a user account in LON-CAPA', '',{'no_inline_link' => 1,}); @@ -415,13 +417,16 @@ sub handler { } } - &check_can_host($r,\%form,$authhost); + unless (&check_can_host($r,\%form,$authhost)) { + return OK; + } if ($r->dir_config("lonBalancer") eq 'yes') { &success($r,$form{'uname'},$form{'udom'},$authhost,'noredirect',undef, \%form); my ($otherserver) = &Apache::lonnet::choose_server($form{'udom'}); $r->internal_redirect('/adm/switchserver?otherserver='.$otherserver.'&origurl='.$firsturl); + return OK; } else { # ------------------------------------------------------- Do the load balancing @@ -443,12 +448,13 @@ sub handler { &success($r,$form{'uname'},$form{'udom'},$authhost,'noredirect', undef,\%form); $r->internal_redirect('/adm/switchserver?otherserver='.$unloaded.'&origurl='.$firsturl); + return OK; } } &success($r,$form{'uname'},$form{'udom'},$authhost,$firsturl,undef, \%form); + return OK; } - return OK; } sub check_can_host { @@ -503,7 +509,6 @@ sub check_can_host { '

'.&mt('Currently a LON-CAPA server is not available within the [_1] domain for you to log-in to, to create an account.',$domdesc).'

'. &Apache::loncommon::end_page()); } - return OK; } else { &success($r,$form->{'uname'},$udom,$authhost,'noredirect',undef, $form); @@ -511,6 +516,7 @@ sub check_can_host { $r->internal_redirect('/adm/switchserver?otherserver='.$otherserver); } } + return $canhost; } 1;