summaryrefslogtreecommitdiff
path: root/FS/FS/svc_acct.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/svc_acct.pm')
-rw-r--r--FS/FS/svc_acct.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index ad8d9a152..c4dbb00c9 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -188,6 +188,20 @@ Creates a new account. To add the account to the database, see L<"insert">.
sub table { 'svc_acct'; }
+sub _fieldhandlers {
+ #false laziness with edit/svc_acct.cgi
+ 'usergroup' => sub {
+ my $usergroup = shift;
+ if ( ref($usergroup) eq 'ARRAY' ) {
+ $usergroup;
+ } elsif ( length($usergroup) ) {
+ [ split(/\s*,\s*/, $usergroup) ];
+ } else {
+ [];
+ }
+ },
+}
+
=item insert [ , OPTION => VALUE ... ]
Adds this account to the database. If there is an error, returns the error,