diff options
author | thomascube <thomas@roundcube.net> | 2011-02-12 14:23:17 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-02-12 14:23:17 +0000 |
commit | a1bbc2cb163fe35f6b379b4baf2858d49695de11 (patch) | |
tree | 1fefb03447fff2f9dd88ba04773a87067717ed11 /program | |
parent | 7fb11ef6a91857ff37184487a994ea0017835d67 (diff) |
Fix for alias query which was broken in last commit
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcube_user.php | 6 |
1 files 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); } |