function _profile_get_fields

Same name and namespace in other branches
  1. 6.x drupal-6.x/modules/profile/profile.module \_profile_get_fields()
3 calls to _profile_get_fields()
profile_form_alter in drupal-7.x/modules/profile/profile.module
Implements hook_form_alter().
profile_save_profile in drupal-7.x/modules/profile/profile.module
profile_user_form_validate in drupal-7.x/modules/profile/profile.module
Form validation handler for the user register/profile form.

Archivo

drupal-7.x/modules/profile/profile.module, line 614
Support for configurable user profiles.

Código

function _profile_get_fields($category, $register = FALSE) {
  $query = db_select('profile_field');
  if ($register) {
    $query->condition('register', 1);
  }
  else {
    $query->condition('category', db_like($category), 'LIKE');
  }
  if (!user_access('administer users')) {
    $query->condition('visibility', PROFILE_HIDDEN, '<>');
  }
  return $query->fields('profile_field')->orderBy('category', 'ASC')->orderBy('weight', 'ASC')->execute();
}