diff options
author | ivan <ivan> | 2006-04-03 23:26:03 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-04-03 23:26:03 +0000 |
commit | 7344abba907bdf860ee9afe602768ec44ded6c21 (patch) | |
tree | 47963fe7c035a64fe2d9f4ce1c759ec7e5195824 /FS/FS/svc_acct.pm | |
parent | 8e9dcecdfc1cad277dcce3fd58d51b20566f9ec9 (diff) |
option to disable global uniqueness checking
Diffstat (limited to 'FS/FS/svc_acct.pm')
-rw-r--r-- | FS/FS/svc_acct.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 2872a5f74..aa3e592a3 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -902,6 +902,9 @@ per export and with identical I<svcpart> values. sub _check_duplicate { my $self = shift; + my $global_unique = $conf->config('global_unique-username') || 'none'; + return '' if $global_unique eq 'disabled'; + #this is Pg-specific. what to do for mysql etc? # ( mysql LOCK TABLES certainly isn't equivalent or useful here :/ ) warn "$me locking svc_acct table for duplicate search" if $DEBUG; @@ -914,8 +917,6 @@ sub _check_duplicate { return 'unknown svcpart '. $self->svcpart; } - my $global_unique = $conf->config('global_unique-username') || 'none'; - my @dup_user = grep { !$self->svcnum || $_->svcnum != $self->svcnum } qsearch( 'svc_acct', { 'username' => $self->username } ); return gettext('username_in_use') |