summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-09-06 17:18:12 +0000
committeralecpl <alec@alec.pl>2011-09-06 17:18:12 +0000
commitd5ae9772c1427dbbcf1cb7582106dd1d542bc26e (patch)
tree4c3f47d650e675777bbaa4265e59d52cc3058062 /program/include
parentf8e48df71540b268ceac058d32b8ee848fc2ab6b (diff)
- Fix username case-insensitivity issue in MySQL (#1488021)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_user.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php
index 90edad6e9..500b9224d 100644
--- a/program/include/rcube_user.php
+++ b/program/include/rcube_user.php
@@ -399,11 +399,8 @@ class rcube_user
{
$dbh = rcmail::get_instance()->get_dbh();
- // use BINARY (case-sensitive) comparison on MySQL, other engines are case-sensitive
- $mod = preg_match('/^mysql/', $dbh->db_provider) ? 'BINARY' : '';
-
// query for matching user name
- $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND %s = $mod ?";
+ $query = "SELECT * FROM ".get_table_name('users')." WHERE mail_host = ? AND %s = ?";
$sql_result = $dbh->query(sprintf($query, 'username'), $host, $user);
// query for matching alias