user_profile_form
modules/user/user.pages.inc, строка 245
- Версии
- 6
user_profile_form($form_state, $account, $category = 'account')
Form builder; edit a user account or one of their profile categories.
See also
@see user_profile_form_submit()
See also
Связанные темы
Код
<?php
function user_profile_form($form_state, $account, $category = 'account') {
$edit = (empty($form_state['values'])) ? (array)$account : $form_state['values'];
$form = _user_forms($edit, $account, $category);
$form['_category'] = array('#type' => 'value', '#value' => $category);
$form['_account'] = array('#type' => 'value', '#value' => $account);
$form['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#weight' => 30);
if (user_access('administer users')) {
$form['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#weight' => 31,
'#submit' => array('user_edit_delete_submit'),
);
}
$form['#attributes']['enctype'] = 'multipart/form-data';
return $form;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии