summaryrefslogtreecommitdiff
path: root/httemplate/edit/svc_acct.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/svc_acct.cgi')
-rwxr-xr-xhttemplate/edit/svc_acct.cgi15
1 files changed, 14 insertions, 1 deletions
diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi
index 4b324a501..71b324d99 100755
--- a/httemplate/edit/svc_acct.cgi
+++ b/httemplate/edit/svc_acct.cgi
@@ -69,7 +69,20 @@ unless ( $svcnum || $cgi->param('error') ) { #adding
}
$svc_acct->set_default_and_fixed( {
- 'usergroup' => sub { @groups = split(',', shift ); },
+ #false laziness w/svc-acct::_fieldhandlers
+ 'usergroup' => sub {
+ my( $self, $groups ) = @_;
+ if ( ref($groups) eq 'ARRAY' ) {
+ @groups = @$groups;
+ $groups;
+ } elsif ( length($groups) ) {
+ @groups = split(/\s*,\s*/, $groups);
+ [ @groups ];
+ } else {
+ @groups = ();
+ [];
+ }
+ }
} );
}