function user_user in Drupal 5
Same name and namespace in other branches
- 4 modules/user.module \user_user()
- 6 modules/user/user.module \user_user()
Implementation of hook_user().
File
- modules/
user/ user.module, line 466 - Enables the user registration and login system.
Code
function user_user($type, &$edit, &$user, $category = NULL) {
if ($type == 'view') {
$items['history'] = 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,
),
);
}
}