From 48f12f070ac79be2c1c776dd2e245f99fa12160b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 21 Oct 2013 11:09:19 +1300 Subject: [PATCH] Drupal user fns - copy Coleman's code in https://github.com/civicrm/civicrm-core/pull/1798/files#r7022773 --- CRM/Utils/System/Drupal6.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CRM/Utils/System/Drupal6.php b/CRM/Utils/System/Drupal6.php index 2a504269c5..47e4b36113 100644 --- a/CRM/Utils/System/Drupal6.php +++ b/CRM/Utils/System/Drupal6.php @@ -174,13 +174,10 @@ class CRM_Utils_System_Drupal6 extends CRM_Utils_System_DrupalBase { FROM {users} WHERE (LOWER(name) = LOWER('$name')) OR (LOWER(mail) = LOWER('$email')) "; - $result = db_query($sql); - $rows = array(); - if (count($result) > 0) { - $rows[] = db_fetch_array($result); - } - if(empty($rows)) { + $result = db_query($sql); + $rows = db_fetch_array($result); + if (!$rows) { return; } $row = $rows[0]; -- 2.25.1