You are here

public static function FeedImportFilter::userHashPassword in Feed Import 8

Same name in this branch
  1. 8 feed_import_base/filters/feed_import_default_filters.php \FeedImportFilter::userHashPassword()
  2. 8 feed_import_base/src/Filter/FeedImportFilter.php \Drupal\feed_import_base\FeedImportFilter::userHashPassword()

This function hashes an user password

Parameters

mixed $field: A string or an array of strings

Return value

mixed Resulted hashes

File

feed_import_base/src/Filter/FeedImportFilter.php, line 723

Class

FeedImportFilter
This class contains default filters for feed import.

Namespace

Drupal\feed_import_base

Code

public static function userHashPassword($field) {
  static $not_included = TRUE;
  if ($not_included) {

    // @FIXME
    // // @FIXME
    // // This looks like another module's variable. You'll need to rewrite this call
    // // to ensure that it uses the correct configuration object.
    // require_once \Drupal::root() . '/' . variable_get('password_inc', 'includes/password.inc');
    $not_included = FALSE;
  }
  if (is_array($field)) {
    return array_map(array(
      __CLASS__,
      __FUNCTION__,
    ), $field);
  }
  return user_hash_password($field);
}