function _profile_get_fields

3 calls to _profile_get_fields()
profile_form_alter in modules/profile/profile.module
Implements hook_form_alter().
profile_save_profile in modules/profile/profile.module
profile_user_form_validate in modules/profile/profile.module
Form validation handler for the user register/profile form.

File

modules/profile/profile.module, line 614

Code

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.