X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Faccess_user.html;h=8e7e70a0601dfae006c2d85b05fe65642af80a8c;hb=b5dbd9e1bcbb701a20ed23e723b1e0105fd7c1a1;hp=e6258a9b11dc3f7042b523b2442a06db6e032ea3;hpb=42ad860da02665aa21193d3bc418ef03e96727fb;p=freeside.git diff --git a/httemplate/edit/process/access_user.html b/httemplate/edit/process/access_user.html index e6258a9b1..8e7e70a06 100644 --- a/httemplate/edit/process/access_user.html +++ b/httemplate/edit/process/access_user.html @@ -10,6 +10,7 @@ 'process_m2m' => { 'link_table' => 'access_usergroup', 'target_table' => 'access_group', }, + 'precheck_callback'=> \&precheck_callback, ) %> % } @@ -23,4 +24,13 @@ if ( FS::Conf->new->exists('disable_acl_changes') ) { die "shouldn't be reached"; } +sub precheck_callback { + my $cgi = shift; + my $o = FS::access_user->new({username => $cgi->param('username')}); + if( $o->is_system_user and !$cgi->param('usernum') ) { + $cgi->param('username',''); + return "username '".$o->username."' reserved for system account." + } + return ''; +}