X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=39f969f095b6ce8b5f99032e6e8c325f7bf0ded0;hb=fed12e8214a8a951377961ccbe7a09171b1e38c2;hp=8e71d829d3306a7d40ecb2dd6708bd017f8b70f7;hpb=87f255507af9f14dfbccd37eefd71a148f9af344;p=freeside.git diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 8e71d829d..39f969f09 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -15,6 +15,7 @@ use vars qw( $DEBUG $me $conf $skip_fuzzyfiles $username_noperiod $username_nounderscore $username_nodash $username_uppercase $username_percent $username_colon $username_slash $username_equals $username_pound + $username_exclamation $password_noampersand $password_noexclamation $warning_template $warning_from $warning_subject $warning_mimetype $warning_cc @@ -85,6 +86,7 @@ FS::UID->install_callback( sub { $username_slash = $conf->exists('username-slash'); $username_equals = $conf->exists('username-equals'); $username_pound = $conf->exists('username-pound'); + $username_exclamation = $conf->exists('username-exclamation'); $password_noampersand = $conf->exists('password-noexclamation'); $password_noexclamation = $conf->exists('password-noexclamation'); $dirhash = $conf->config('dirhash') || 0; @@ -1193,7 +1195,7 @@ sub check { my $ulen = $usernamemax || $self->dbdef_table->column('username')->length; - $recref->{username} =~ /^([a-z0-9_\-\.\&\%\:\/\=\#]{$usernamemin,$ulen})$/i + $recref->{username} =~ /^([a-z0-9_\-\.\&\%\:\/\=\#\!]{$usernamemin,$ulen})$/i or return gettext('illegal_username'). " ($usernamemin-$ulen): ". $recref->{username}; $recref->{username} = $1; @@ -1234,6 +1236,9 @@ sub check { unless ( $username_pound ) { $recref->{username} =~ /\#/ and return $uerror; } + unless ( $username_exclamation ) { + $recref->{username} =~ /\!/ and return $uerror; + } $recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum}; @@ -2824,7 +2829,7 @@ sub search { ' LEFT JOIN cust_svc USING ( svcnum ) ', ' LEFT JOIN part_svc USING ( svcpart ) ', ' LEFT JOIN cust_pkg USING ( pkgnum ) ', - ' LEFT JOIN cust_main USING ( custnum ) ', + FS::UI::Web::join_cust_main('cust_pkg', 'cust_pkg') ); my @where = ();