user_user

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/user/user.module, строка 466

Версии
5
user_user($type, &$edit, &$user, $category = NULL)
6
user_user($type, &$edit, &$account, $category = NULL)

Реализация hook_user().

Код

<?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));
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему