/[drupal]/contributions/modules/node_import/node_import.inc
ViewVC logotype

Diff of /contributions/modules/node_import/node_import.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.23, Thu Jan 1 09:49:31 2009 UTC revision 1.1.2.24, Thu Jan 1 09:52:17 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: node_import.inc,v 1.1.2.22 2008/12/16 22:12:23 robrechtj Exp $  // $Id: node_import.inc,v 1.1.2.23 2009/01/01 09:49:31 robrechtj Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 1017  function node_import_check_email(&$value Line 1017  function node_import_check_email(&$value
1017   * Uses: nothing.   * Uses: nothing.
1018   */   */
1019  function node_import_check_user(&$value, $field, $options, $preview) {  function node_import_check_user(&$value, $field, $options, $preview) {
1020    if (($uid = db_result(db_query("SELECT uid FROM {users} WHERE uid = %d OR LOWER(name) = '%s' OR LOWER(mail) = '%s'", is_numeric($value) && intval($value) > 0 ? $value : -1, drupal_strtolower($value), drupal_strtolower($value))))) {    if (($uid = node_import_get_object('user', $value)) !== NULL) {
1021        return $uid;
1022      }
1023      else if (($uid = db_result(db_query("SELECT uid FROM {users} WHERE uid = %d OR LOWER(name) = '%s' OR LOWER(mail) = '%s'", is_numeric($value) && intval($value) > 0 ? $value : -1, drupal_strtolower($value), drupal_strtolower($value))))) {
1024        node_import_set_object('user', $value, $uid);
1025      $value = $uid;      $value = $uid;
1026      return TRUE;      return TRUE;
1027    }    }

Legend:
Removed from v.1.1.2.23  
changed lines
  Added in v.1.1.2.24

  ViewVC Help
Powered by ViewVC 1.1.2