From: Florent Bruneau Date: Sun, 15 Feb 2009 17:10:57 +0000 (+0100) Subject: There are users without profile. X-Git-Tag: xorg/1.0.0~332^2~359 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=eb1449b8572cd9b2e0af7e721b65d82d85b1d988;p=platal.git There are users without profile. Signed-off-by: Florent Bruneau --- diff --git a/classes/userfilter.php b/classes/userfilter.php index 30a7029..0b172dd 100644 --- a/classes/userfilter.php +++ b/classes/userfilter.php @@ -161,6 +161,14 @@ class UFC_Or extends UFC_NChildren } } +class UFC_Profile implements UserFilterCondition +{ + public function buildCondition(UserFilter &$uf) + { + return '$PID IS NOT NULL'; + } +} + class UFC_Promo implements UserFilterCondition { @@ -674,8 +682,8 @@ class UserFilter $where = $this->root->buildCondition($this); $joins = $this->buildJoins(); $this->query = 'FROM accounts AS a - INNER JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET(\'owner\', ap.perms)) - INNER JOIN profiles AS p ON (p.pid = ap.pid) + LEFT JOIN account_profiles AS ap ON (ap.uid = a.uid AND FIND_IN_SET(\'owner\', ap.perms)) + LEFT JOIN profiles AS p ON (p.pid = ap.pid) ' . $joins . ' WHERE (' . $where . ')'; }