add svc_acct-no_edit_username config, RT#13416
[freeside.git] / FS / FS / svc_acct.pm
index 1c4b574..9a2f009 100644 (file)
@@ -993,6 +993,10 @@ sub replace {
 
   }
 
+  return "can't change username"
+    if $old->username ne $new->username
+    && $conf->exists('svc_acct-no_edit_username');
+
   #change homdir when we change username
   $new->setfield('dir', '') if $old->username ne $new->username;