profile_categories
modules/profile/profile.module, строка 751
- Версии
- 5 – 6
profile_categories()
Код
<?php
function profile_categories() {
// Hide hidden profile fields from users that don't have permission to administer users.
// For these users, categories with only hidden profile fields will not be returned.
if (user_access('administer users')) {
$result = db_query("SELECT DISTINCT(category) FROM {profile_fields}");
}
else {
$result = db_query("SELECT DISTINCT(category) FROM {profile_fields} WHERE visibility <> %d", PROFILE_HIDDEN);
}
while ($category = db_fetch_object($result)) {
$data[] = array('name' => $category->category, 'title' => $category->category, 'weight' => 3);
}
return $data;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии