From ef1e877a8dd419fcb0de772bf0c40eeca76ee7eb Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sat, 25 Feb 2012 13:15:25 -0500
Subject: [PATCH] Connect to IMAP server before reading quota

---
 program/include/rcube_user.php |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php
index 90edad6..d1df643 100644
--- a/program/include/rcube_user.php
+++ b/program/include/rcube_user.php
@@ -6,7 +6,10 @@
  |                                                                       |
  | This file is part of the Roundcube Webmail client                     |
  | Copyright (C) 2005-2010, The Roundcube Dev Team                       |
- | Licensed under the GNU GPL                                            |
+ |                                                                       |
+ | Licensed under the GNU General Public License version 3 or            |
+ | any later version with exceptions for skins & plugins.                |
+ | See the README file for a full license statement.                     |
  |                                                                       |
  | PURPOSE:                                                              |
  |   This class represents a system user linked and provides access      |
@@ -399,11 +402,8 @@
     {
         $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

--
Gitblit v1.9.1