diff options
author | ivan <ivan> | 2006-08-14 08:38:08 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-08-14 08:38:08 +0000 |
commit | 97168edae6af4a4d98c4f790b0c064b73efbb9fd (patch) | |
tree | 6688048ebfc00aa4669a3c0fb18fcb6e56126a0d /FS | |
parent | 8e3dfb380406e145494a5fffa7a0e4aab7b38253 (diff) |
bugfix for agentless access users, triggered by part_referral (advertising source) agent virtualization
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/access_user.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/access_user.pm b/FS/FS/access_user.pm index 830d7f826..874da6687 100644 --- a/FS/FS/access_user.pm +++ b/FS/FS/access_user.pm @@ -297,8 +297,12 @@ Returns an sql fragement to select only agentnums this user can view. sub agentnums_sql { my $self = shift; + + my @agentnums = $self->agentnums; + return ' 1 = 0 ' unless scalar(@agentnums); + '( '. - join( ' OR ', map "agentnum = $_", $self->agentnums ). + join( ' OR ', map "agentnum = $_", @agentnums ). ' )'; } |