user_profile_form

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 user_profile_form($form_state, $account, $category = 'account')

Form builder; edit a user account or one of their profile categories.

See also

user_profile_form_validate()

user_profile_form_submit()

user_cancel_confirm_form_submit()

Verwandte Themen

Code

modules/user/user.pages.inc, line 261

<?php
function user_profile_form($form_state, $account, $category = 'account') {
  global $user;

  $edit = (empty($form_state['values'])) ? (array) $account : $form_state['values'];

  $form = _user_forms($edit, $account, $category);

  // Attach field widgets.
  field_attach_form('user', (object) $edit, $form, $form_state);

  $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 (($account->uid == $user->uid && user_access('cancel account')) || user_access('administer users')) {
    $form['cancel'] = array(
      '#type' => 'submit',
      '#value' => t('Cancel account'),
      '#weight' => 31,
      '#submit' => array('user_edit_cancel_submit'),
    );
  }

  return $form;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen