RT# 80514 Selfservice can update ssn/stateid payment info
[freeside.git] / FS / FS / ClientAPI / MyAccount / contact.pm
index 5690f86..dd3a40b 100644 (file)
@@ -26,12 +26,9 @@ sub contact_passwd {
 
   my $error = '';
 
-  # use these svc_acct length restrictions??
-  my $conf = new FS::Conf;
-  $error = 'Password too short.'
-    if length($p->{'new_password'}) < ($conf->config('passwordmin') || 6);
-  $error = 'Password too long.'
-    if length($p->{'new_password'}) > ($conf->config('passwordmax') || 8);
+  # length checks now in is_password_allowed
+
+  $error ||= $contact->is_password_allowed($p->{'new_password'});
 
   $error ||= $contact->change_password($p->{'new_password'});
 
@@ -82,7 +79,7 @@ sub list_contacts {
       #TODO: contact phone numbers
       'comment'            => $_->comment,
       'selfservice_access' => $_->selfservice_access,
-      'disabled'           => $contact->disabled,
+      #'disabled'           => $contact->disabled,
     };
   } $cust_main->cust_contact );
 
@@ -141,7 +138,7 @@ sub delete_contact {
   my $error = $cust_contact->delete;
   return { 'error' => $error } if $error;
 
-  unless ( $contact->cust_contact ) {
+  unless ( $contact->cust_contact || $contact->prospect_contact ) {
     $contact->delete;
   }