[LON-CAPA-cvs] cvs: loncom /interface loncreateuser.pm

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 29 Apr 2002 14:47:57 -0000


matthew		Mon Apr 29 10:47:57 2002 EDT

  Modified files:              
    /loncom/interface	loncreateuser.pm 
  Log:
  Squashing the same bug as last commit for the folks who are not allowed MAU.
  
  
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.34 loncom/interface/loncreateuser.pm:1.35
--- loncom/interface/loncreateuser.pm:1.34	Mon Apr 29 10:32:11 2002
+++ loncom/interface/loncreateuser.pm	Mon Apr 29 10:47:57 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.34 2002/04/29 14:32:11 matthew Exp $
+# $Id: loncreateuser.pm,v 1.35 2002/04/29 14:47:57 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -47,7 +47,7 @@
 # 11/12,11/13,11/15 Scott Harrison
 # 02/11/02 Matthew Hall
 #
-# $Id: loncreateuser.pm,v 1.34 2002/04/29 14:32:11 matthew Exp $
+# $Id: loncreateuser.pm,v 1.35 2002/04/29 14:47:57 matthew Exp $
 ###
 
 package Apache::loncreateuser;
@@ -532,9 +532,12 @@
 	$amode='localauth';
 	$genpwd=$ENV{'form.locarg'};
 	$genpwd=" " if (!$genpwd);
-    } elsif (($ENV{'form.login'} eq 'nochange')) { 
+    } elsif (($ENV{'form.login'} eq 'nochange') ||
+             ($ENV{'form.login'} eq ''        )) { 
         # There is no need to tell the user we did not change what they
         # did not ask us to change.
+        # If they are creating a new user but have not specified login
+        # information this will be caught below.
     } else {
 	    $r->print($error.'Invalid login mode or password'.$end);    
 	    return;
@@ -574,7 +577,8 @@
                                                $ENV{'form.ccdomain'});
         $r->print('<br>Home server: '.$home.' '.
                   $Apache::lonnet::libserv{$home});
-    } elsif ($ENV{'form.login'} ne 'nochange') {
+    } elsif (($ENV{'form.login'} ne 'nochange') &&
+             ($ENV{'form.login'} ne ''        )) {
 	# Modify user privileges
 	$r->print(<<ENDMODIFYUSERHEAD);
 <h1>Change User Privileges</h1>