You are here

function profile_categories in Drupal 6

Same name and namespace in other branches
  1. 4 modules/profile.module \profile_categories()
  2. 5 modules/profile/profile.module \profile_categories()
1 call to profile_categories()
profile_user in modules/profile/profile.module
Implementation of hook_user().

File

modules/profile/profile.module, line 450
Support for configurable user profiles.

Code

function profile_categories() {
  $result = db_query("SELECT DISTINCT(category) FROM {profile_fields}");
  $data = array();
  while ($category = db_fetch_object($result)) {
    $data[] = array(
      'name' => $category->category,
      'title' => $category->category,
      'weight' => 3,
      'access callback' => 'profile_category_access',
      'access arguments' => array(
        1,
        $category->category,
      ),
    );
  }
  return $data;
}