X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=c4dbb00c989bbad13746052e5f800c3c3d0bbf9a;hp=ad8d9a152b4728ec03c9299a5903b994af1954e8;hb=936038efe0b75ad037619167f62db7fe16c25255;hpb=7fc8c3c193c3d673a58566569a0e82609212a087 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,