self-service interface: add proper password changer and prevent "Setup my services...
[freeside.git] / FS / FS / svc_acct.pm
index c50dfd5..b201f23 100644 (file)
@@ -484,6 +484,11 @@ sub replace {
   my $error;
   warn "$me replacing $old with $new\n" if $DEBUG;
 
+  # We absolutely have to have an old vs. new record to make this work.
+  if (!defined($old)) {
+    $old = qsearchs( 'svc_acct', { 'svcnum' => $new->svcnum } );
+  }
+
   return "can't modify system account" if $old->_check_system;
 
   {