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

raeburn raeburn at source.lon-capa.org
Sun Aug 25 21:28:52 EDT 2019


raeburn		Mon Aug 26 01:28:52 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonuserutils.pm 
  Log:
  - For 2.11
    Backport 1.202, 1.203
  
  
Index: loncom/interface/lonuserutils.pm
diff -u loncom/interface/lonuserutils.pm:1.184.4.4 loncom/interface/lonuserutils.pm:1.184.4.5
--- loncom/interface/lonuserutils.pm:1.184.4.4	Thu Aug 22 19:31:20 2019
+++ loncom/interface/lonuserutils.pm	Mon Aug 26 01:28:51 2019
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Utility functions for managing LON-CAPA user accounts
 #
-# $Id: lonuserutils.pm,v 1.184.4.4 2019/08/22 19:31:20 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.184.4.5 2019/08/26 01:28:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -655,10 +655,12 @@
     my %passwdconf = &Apache::lonnet::get_passwdconf($domain);
     my ($min,$max, at chars,$numrules,$intargjs,%alert);
     $numrules = 0;
+    $min = $Apache::lonnet::passwdmin;
     if (ref($passwdconf{'chars'}) eq 'ARRAY') {
         if ($passwdconf{'min'} =~ /^\d+$/) {
-            $min = $passwdconf{'min'};
-            $numrules ++;
+            if ($passwdconf{'min'} > $min) {
+                $min = $passwdconf{'min'};
+            }
         }
         if ($passwdconf{'max'} =~ /^\d+$/) {
             $max = $passwdconf{'max'};
@@ -668,11 +670,11 @@
         if (@chars) {
             $numrules ++;
         }
-    } else {
-        $min = 7;
+    }
+    if ($min > 0) {
         $numrules ++;
     }
-    if (($min ne '') || ($max ne '') || (@chars > 0)) {
+    if (($min > 0) || ($max ne '') || (@chars > 0)) {
         my $alertmsg = &mt('Initial password did not satisfy requirement(s):').'\n\n';
         if ($min) {
             $alert{'min'} = &mt('minimum [quant,_1,character]',$min).'\n';




More information about the LON-CAPA-cvs mailing list