function profile_user_categories
Implements hook_user_categories().
File
-
modules/
profile/ profile.module, line 501
Code
function profile_user_categories() {
$result = db_query("SELECT DISTINCT(category) FROM {profile_field}");
$data = array();
foreach ($result as $category) {
$data[] = array(
'name' => $category->category,
'title' => $category->category,
'weight' => 3,
'access callback' => 'profile_category_access',
'access arguments' => array(
1,
$category->category,
),
);
}
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.