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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Wed, 20 Aug 2008 21:28:17 -0000


raeburn		Wed Aug 20 17:28:17 2008 EDT

  Modified files:              
    /loncom/interface	lonuserutils.pm 
  Log:
  Bug 5774.
  - Fix javascript error - var is founddomain NOT founddom.
  - User data field for domain is optional; uses default if not provided.   
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.61 loncom/interface/lonuserutils.pm:1.62
--- loncom/interface/lonuserutils.pm:1.61	Wed Aug 13 04:17:58 2008
+++ loncom/interface/lonuserutils.pm	Wed Aug 20 17:28:14 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.61 2008/08/13 08:17:58 bisitz Exp $
+# $Id: lonuserutils.pm,v 1.62 2008/08/20 21:28:14 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -558,7 +558,7 @@
         if (tw==11) { foundrole=1; }
         if (tw==12) { founddomain=1; }
     }
-    verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail,foundrole,founddom);
+    verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail,foundrole,founddomain);
 }
 
 //
@@ -3592,16 +3592,8 @@
                               '</b>');
                     next;
                 } else {
-                    my $baddom = 0;
                     if ($entries{$fields{'dom'}} 
                         ne &LONCAPA::clean_domain($entries{$fields{'domain'}})) {
-                        $baddom = 1;
-                    } else {
-                        if (&Apache::lonnet::domain($entries{$fields{'domain'}}) eq '') {
-                            $baddom = 1;
-                        }
-                    }
-                    if ($baddom) {
                         $r->print('<br />'. '<b>'.$entries{$fields{'domain'}}.
                                   '</b>: '.&mt('Unacceptable domain for user [_2] [_3] [_4] [_5]',$fname,$mname,$lname,$gen).'</b>');
                         next;