You are here

function uuid_user_features_export_options in UUID Features Integration 7

Implements hook_features_export_options().

File

includes/uuid_user.features.inc, line 10
Features hooks for the user features component.

Code

function uuid_user_features_export_options() {
  $options = array();
  if (variable_get('uuid_features_entity_user_user', FALSE)) {
    $query = db_select('users', 'u')
      ->fields('u', array(
      'uid',
      'name',
      'mail',
      'uuid',
    ))
      ->condition('u.uid', 0, '>')
      ->orderBy('u.name', 'ASC')
      ->addTag('uuid_user_features_export_options');
    $results = $query
      ->execute()
      ->fetchAll();
    foreach ($results as $user) {
      $options[$user->uuid] = t('@name: @mail', array(
        '@name' => $user->name,
        '@mail' => $user->mail,
      ));
    }
  }
  return $options;
}