_profile_get_fields
- Versions
- 5 – 7
_profile_get_fields($category, $register = FALSE)
Code
modules/profile/profile.module, line 605
<?php
function _profile_get_fields($category, $register = FALSE) {
$query = db_select('profile_field');
if ($register) {
$query->condition('register', 1);
}
else {
// Use LOWER(:category) instead of PHP's strtolower() to avoid UTF-8 conversion issues.
$query->where('LOWER(category) = LOWER(:category)', array(':category' => $category));
}
if (!user_access('administer users')) {
$query->condition('visibility', PROFILE_HIDDEN, '<>');
}
return $query
->fields('profile_field')
->orderBy('category', 'ASC')
->orderBy('weight', 'ASC')
->execute();
}
?>Login or register to post comments 