You are here

function profile_user in Drupal 6

Same name and namespace in other branches
  1. 4 modules/profile.module \profile_user()
  2. 5 modules/profile/profile.module \profile_user()

Implementation of hook_user().

File

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

Code

function profile_user($type, &$edit, &$user, $category = NULL) {
  switch ($type) {
    case 'load':
      return profile_load_profile($user);
    case 'register':
      return profile_form_profile($edit, $user, $category, TRUE);
    case 'update':
      return profile_save_profile($edit, $user, $category);
    case 'insert':
      return profile_save_profile($edit, $user, $category, TRUE);
    case 'view':
      return profile_view_profile($user);
    case 'form':
      return profile_form_profile($edit, $user, $category);
    case 'validate':
      return profile_validate_profile($edit, $category);
    case 'categories':
      return profile_categories();
    case 'delete':
      db_query('DELETE FROM {profile_values} WHERE uid = %d', $user->uid);
  }
}