diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/ClientAPI/Signup.pm | 4 | ||||
-rw-r--r-- | FS/FS/Conf.pm | 3 | ||||
-rw-r--r-- | FS/FS/cust_main.pm | 4 | ||||
-rw-r--r-- | FS/FS/svc_acct.pm | 3 |
4 files changed, 11 insertions, 3 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index b026afd33..d0d088ad4 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -186,7 +186,6 @@ sub signup_info { 'company_name' => scalar($conf->config('company_name')), #per-agent? 'agent_ship_address' => scalar($conf->exists('agent-ship_address')), - 'require_phone' => scalar($conf->exists('cust_main-require_phone')), 'logo' => scalar($conf->config_binary('logo.png')), 'prepaid_template_custnum' => $conf->exists('signup_server-prepaid-template-custnum'), }; @@ -405,6 +404,9 @@ sub signup_info { qw( head body_header body_footer ) ), ( map { $_ => join("\n", $conf->config("signup_server-$_", $agentnum ) ) } qw( terms_of_service ) ), + + ( map { $_ => scalar($conf->exists($_, $agentnum)) } + qw(cust_main-require_phone) ), }; $cache->set("signup_info_cache_agent$agentnum", $signup_info_cache_agent); diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 9d81b7514..4393dcfdd 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1786,6 +1786,7 @@ and customer address. Include units.', 'section' => 'username', 'description' => 'Allow uppercase characters in usernames. Not recommended for use with FreeRADIUS with MySQL backend, which is case-insensitive by default.', 'type' => 'checkbox', + 'per_agent' => 1, }, { @@ -3589,6 +3590,7 @@ and customer address. Include units.', 'section' => '', 'description' => 'Require daytime or night phone for all customer records.', 'type' => 'checkbox', + 'per_agent' => 1, }, { @@ -3596,6 +3598,7 @@ and customer address. Include units.', 'section' => '', 'description' => 'Email address field is required: require at least one invoicing email address for all customer records.', 'type' => 'checkbox', + 'per_agent' => 1, }, { diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index f3f66020a..1da788cc6 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1847,7 +1847,7 @@ sub check { return $error if $error; } - if ( $conf->exists('cust_main-require_phone') + if ( $conf->exists('cust_main-require_phone', $self->agentnum) && ! length($self->daytime) && ! length($self->night) && ! length($self->mobile) ) { @@ -3214,7 +3214,7 @@ sub check_invoicing_list { } return "Email address required" - if $conf->exists('cust_main-require_invoicing_list_email') + if $conf->exists('cust_main-require_invoicing_list_email', $self->agentnum) && ! grep { $_ !~ /^([A-Z]+)$/ } @$arrayref; ''; diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 82a5a8a61..139f92715 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1163,6 +1163,7 @@ sub check { my $cust_pkg; local $username_letter = $username_letter; + local $username_uppercase = $username_uppercase; if ($self->svcnum) { my $cust_svc = $self->cust_svc or return "no cust_svc record found for svcnum ". $self->svcnum; @@ -1174,6 +1175,8 @@ sub check { if ($cust_pkg) { $username_letter = $conf->exists('username-letter', $cust_pkg->cust_main->agentnum); + $username_uppercase = + $conf->exists('username-uppercase', $cust_pkg->cust_main->agentnum); } my $ulen = $usernamemax || $self->dbdef_table->column('username')->length; |