function user_profile_form in Drupal 6
Same name and namespace in other branches
- 7 modules/user/user.pages.inc \user_profile_form()
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 modules/
user/ user.pages.inc - Form builder; Present the form to edit a given user or profile category.
File
- 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;
}