user_user

Versions
4.6 – 5
user_user($type, &$edit, &$user, $category = NULL)
6
user_user($type, &$edit, &$account, $category = NULL)

Implementation of hook_user().

Code

modules/user/user.module, line 466

<?php
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));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.