--- loncom/interface/loncreateuser.pm	2004/12/28 05:01:44	1.92
+++ loncom/interface/loncreateuser.pm	2004/12/28 22:30:28	1.94
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.92 2004/12/28 05:01:44 raeburn Exp $
+# $Id: loncreateuser.pm,v 1.94 2004/12/28 22:30:28 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -73,10 +73,9 @@ my $authformint;
 my $authformfsys;
 my $authformloc;
 
-BEGIN {
-    $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/;
-    my $krbdefdom=$1;
-    $krbdefdom=~tr/a-z/A-Z/;
+sub initialize_authen_forms {
+    my ($krbdefdom)=( $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/);
+    $krbdefdom= uc($krbdefdom);
     my %param = ( formname => 'document.cu',
                   kerb_def_dom => $krbdefdom 
                   );
@@ -397,6 +396,7 @@ ENDFORMINFO
                     'lg'   => "Login Data"
 				       );
 	my $genhelp=&Apache::loncommon::help_open_topic('Generation');
+        &initialize_authen_forms();
 	$r->print(<<ENDNEWUSER);
 $dochead
 <h1>$lt{'cnu'}</h1>
@@ -674,6 +674,7 @@ END
 		$currentauth=~/^localauth:/
 		) { # bad authentication scheme
 	    if (&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'})) {
+                &initialize_authen_forms();
 		my %lt=&Apache::lonlocal::texthash(
                                'err'   => "ERROR",
 			       'uuas'  => "This user has an unrecognized authentication scheme",
@@ -715,6 +716,7 @@ ENDBADAUTH
         } else { # Authentication type is valid
 	    my $authformcurrent='';
 	    my $authform_other='';
+            &initialize_authen_forms();
 	    if ($currentauth=~/^krb(4|5):/) {
 		$authformcurrent=$authformkrb;
 		$authform_other="<p>$authformint</p>\n".
@@ -1714,6 +1716,7 @@ sub course_sections {
     if ($num_sections == 1) {
         $output = '<select name="currsec_'.$role.'" >'."\n".
                   '  <option value="">Select</option>'."\n".
+                  '  <option value="">No section</option>'."\n".
                   '  <option value="'.$sections[0].'" >'.$sections[0].'</option>'."\n";
     } else {
         $output = '<select name="currsec_'.$role.'" ';