From a1bbc2cb163fe35f6b379b4baf2858d49695de11 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 12 Feb 2011 14:23:17 +0000 Subject: Fix for alias query which was broken in last commit --- program/include/rcube_user.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php index ba5613554..75faf4728 100644 --- a/program/include/rcube_user.php +++ b/program/include/rcube_user.php @@ -362,12 +362,12 @@ class rcube_user $mod = preg_match('/^mysql/', $dbh->db_provider) ? 'BINARY' : ''; // query for matching user name - $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND username = $mod ?"; - $sql_result = $dbh->query($query, $host, $user); + $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND %s = $mod ?"; + $sql_result = $dbh->query(sprintf($query, 'username'), $host, $user); // query for matching alias if (!($sql_arr = $dbh->fetch_assoc($sql_result))) { - $sql_result = $dbh->query(sprintf($query, $prefix.'alias'), $host, $user); + $sql_result = $dbh->query(sprintf($query, 'alias'), $host, $user); $sql_arr = $dbh->fetch_assoc($sql_result); } -- cgit v1.2.3