summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/include/rcube_user.php6
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);
}