diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-12 14:23:17 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-12 14:23:17 +0000 |
| commit | 72c87ab45962cb5aedb26ec251ce09c74498b540 (patch) | |
| tree | acb42c4bdeb6fa3eec77b04fb522415328d6f966 /roundcubemail/program | |
| parent | 81b77c261f92b7b72ebfa3e6d4ffe5ac5d229798 (diff) | |
Fix for alias query which was broken in last commit
git-svn-id: https://svn.roundcube.net/trunk@4533 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/rcube_user.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_user.php b/roundcubemail/program/include/rcube_user.php index ba5613554..75faf4728 100644 --- a/roundcubemail/program/include/rcube_user.php +++ b/roundcubemail/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); } |
