From: Florent Bruneau Date: Tue, 13 Jul 2010 12:12:38 +0000 (+0200) Subject: Bypass the default query of the User class when no uid is specified X-Git-Tag: xorg/1.0.1~15^2~41 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=6d33f1d395b294b3e2b189b64355e63df42147e7;p=platal.git Bypass the default query of the User class when no uid is specified (avoiding malformed queries). Signed-off-by: Florent Bruneau --- diff --git a/classes/user.php b/classes/user.php index b2a75f0..f7f90fa 100644 --- a/classes/user.php +++ b/classes/user.php @@ -148,6 +148,10 @@ class User extends PlUser protected static function loadMainFieldsFromUIDs(array $uids, $respect_order = true) { + if (empty($uids)) { + return PlIteratorUtils::emptyIterator(); + } + global $globals; $joins = ''; $fields = array();