eliminate some false laziness in FS::Misc::send_email vs. msg_template/email.pm send_...
[freeside.git] / FS / FS / Password_Mixin.pm
index 3dd9ce4..b29cf57 100644 (file)
@@ -46,7 +46,7 @@ sub is_password_allowed {
   # basic checks using Data::Password;
   # options for Data::Password
   $DICTIONARY = 0;   # minimum length of disallowed words, false value disables dictionary checking
-  $MINLEN = $conf->config('passwordmin') || 6;
+  $MINLEN = $conf->config('passwordmin') || 8;
   $MAXLEN = $conf->config('passwordmax') || 12;
   $GROUPS = 4;       # must have all 4 'character groups': numbers, symbols, uppercase, lowercase
   # other options use the defaults listed below:
@@ -82,7 +82,9 @@ sub is_password_allowed {
   return '' unless $self->get($self->primary_key); # for validating new passwords pre-insert
 
   #check against customer fields
-  my $cust_main = $self->cust_main;
+  my $cust_main = $self->table eq 'access_user'
+                    ? $self->user_cust_main
+                    : $self->cust_main;
   if ($cust_main) {
     my @words;
     # words from cust_main