allow svc_acct password field to be disabled, #39528, fixing fallout from #29354...
[freeside.git] / FS / FS / svc_acct.pm
index e963c80..af152a8 100644 (file)
@@ -318,7 +318,7 @@ sub table_info {
                          disable_inventory => 1,
                        },
         '_password' => { label => 'Password',
-                         required => 1
+          #required => 1
                        },
         'gid'       => {
                          label    => 'GID',
@@ -2785,6 +2785,7 @@ sub password_svc_check {
   my ($self, $password) = @_;
   foreach my $field ( qw(username finger) ) {
     foreach my $word (split(/\W+/,$self->get($field))) {
+      next unless length($word) > 2;
       if ($password =~ /$word/i) {
         return qq(Password contains account information '$word');
       }