[Svn] r4533 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Sat Feb 12 15:23:17 CET 2011


Author: thomasb
Date: 2011-02-12 08:23:17 -0600 (Sat, 12 Feb 2011)
New Revision: 4533

Modified:
   trunk/roundcubemail/program/include/rcube_user.php
Log:
Fix for alias query which was broken in last commit

Modified: trunk/roundcubemail/program/include/rcube_user.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_user.php	2011-02-12 14:14:11 UTC (rev 4532)
+++ trunk/roundcubemail/program/include/rcube_user.php	2011-02-12 14:23:17 UTC (rev 4533)
@@ -362,12 +362,12 @@
         $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);
         }
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list