diff options
author | Yorhel <git@yorhel.nl> | 2015-04-27 14:18:43 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-04-27 14:18:43 +0200 |
commit | 4847f75423c077845e4a3b523efd191e43ddbc10 (patch) | |
tree | ee9427dbe9bc96353a87812effa5aa3edb4b67f1 /lib/Multi/API.pm | |
parent | 41f576b355df874d3cc1415577914bb3246f2a1b (diff) |
Multi::API: Fix bug when querying stuff while logged in
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r-- | lib/Multi/API.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm index 800af42f..71e3551b 100644 --- a/lib/Multi/API.pm +++ b/lib/Multi/API.pm @@ -975,7 +975,7 @@ sub get_mainsql { my $sql = $type->{sql}; return cerr $c, needlogin => 'Not logged in as a user' if !$sql && !$c->{uid}; - $sql = $type->{sqluser} if $c->{uid}; + $sql = $type->{sqluser} if $c->{uid} && $type->{sqluser}; cpg $c, sprintf($sql, $select, $where, $last, $c->{uid}), \@placeholders, sub { my @res = $_[0]->rowsAsHashes; |