function user_profile_form
7.x user.pages.inc | user_profile_form( |
6.x user.pages.inc | user_profile_form($form_state, $account, $category = 'account') |
Form builder; edit a user account or one of their profile categories.
See also
Related topics
1 string reference to 'user_profile_form'
- user_edit in drupal-6.x/
modules/ user/ user.pages.inc - Form builder; Present the form to edit a given user or profile category.
File
- drupal-6.x/
modules/ user/ user.pages.inc, line 249 - User page callback file for the user module.
Code
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;
}