You are here

function user_user in Drupal 4

Same name and namespace in other branches
  1. 5 modules/user/user.module \user_user()
  2. 6 modules/user/user.module \user_user()

Implementation of hook_user().

File

modules/user.module, line 496
Enables the user registration and login system.

Code

function user_user($type, &$edit, &$user, $category = NULL) {
  if ($type == 'view') {
    $items[] = array(
      'title' => t('Member for'),
      'value' => format_interval(time() - $user->created),
      'class' => 'member',
    );
    return array(
      t('History') => $items,
    );
  }
  if ($type == 'form' && $category == 'account') {
    return user_edit_form(arg(1), $edit);
  }
  if ($type == 'validate' && $category == 'account') {
    return _user_edit_validate(arg(1), $edit);
  }
  if ($type == 'submit' && $category == 'account') {
    return _user_edit_submit(arg(1), $edit);
  }
  if ($type == 'categories') {
    return array(
      array(
        'name' => 'account',
        'title' => t('account settings'),
        'weight' => 1,
      ),
    );
  }
}