diff options
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 37e88e5a5..1af5f6de9 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -216,12 +216,14 @@ function user_load_multiple($uids = array(), $conditions = array(), $reset = FAL } // If the conditions array is populated, add those to the query. if ($conditions) { + // TODO D7: Using LIKE() to get a case insensitive comparison because Crell + // and chx promise that dbtng will map it to ILIKE in postgres. if (isset($conditions['name'])) { - $query->where('LOWER(u.name) = LOWER(:name)', array(':name' => $conditions['name'])); + $query->condition('u.name', $conditions['name'], 'LIKE'); unset($conditions['name']); } if (isset($conditions['mail'])) { - $query->where('LOWER(u.mail) = LOWER(:mail)', array(':mail' => $conditions['mail'])); + $query->condition('u.mail', $conditions['mail'], 'LIKE'); unset($conditions['mail']); } foreach ($conditions as $field => $value) { |