From c846452b76c8a595173a2dc63c912cc4ed105b05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Sat, 26 Nov 2011 01:13:11 +0100 Subject: [PATCH] Restore safe behaviour of getLogin. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The modified version failed when an external account contained a valid X.org hruid... Signed-off-by: Raphaël Barrois --- classes/user.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/user.php b/classes/user.php index 7723c3f..a7467b2 100644 --- a/classes/user.php +++ b/classes/user.php @@ -85,8 +85,8 @@ class User extends PlUser // Checks whether $login is a valid hruid or not. $res = XDB::query('SELECT uid FROM accounts - WHERE hruid' . XDB::formatWildcards(XDB::WILDCARD_CONTAINS, $login)); - if ($res->numRows() == 1) { + WHERE hruid = {?}', $login); + if ($res->numRows()) { return $res->fetchOneCell(); } -- 2.1.4