You are here

function fape_field_edit_node_author_form_submit in Field API Pane Editor (FAPE) 7

Sets the node's user ID to the submitted author user.

See also

node_submit()

1 string reference to 'fape_field_edit_node_author_form_submit'
fape_field_edit_node_author_form in ./fape.module
Subform to edit the entity 'author' field.

File

./fape.module, line 369
Adds direct field editing via contextual links.

Code

function fape_field_edit_node_author_form_submit($form, &$form_state) {
  if ($account = user_load_by_name($form_state['values']['name'])) {
    $form_state['entity']->uid = $account->uid;
  }
  else {
    $form_state['entity']->uid = 0;
  }
}