From: Stéphane Jacob Date: Fri, 4 Nov 2011 09:07:16 +0000 (+0100) Subject: Idendifies user with partial match against hruid. X-Git-Tag: xorg/1.1.4~29 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=7de5cd885589022b78b29d7881ec9922408339d6;p=platal.git Idendifies user with partial match against hruid. Signed-off-by: Stéphane Jacob --- diff --git a/classes/user.php b/classes/user.php index bc9adc5..a0b28ea 100644 --- a/classes/user.php +++ b/classes/user.php @@ -83,9 +83,9 @@ class User extends PlUser } // Checks whether $login is a valid hruid or not. - $res = XDB::query('SELECT uid + $res = XDB::query("SELECT uid FROM accounts - WHERE hruid = {?}', $login); + WHERE hruid LIKE CONCAT('%', {?}, '%')", $login); if ($res->numRows()) { return $res->fetchOneCell(); }