You are here

function redhen_contact_user_update_submit in RedHen CRM 7

Same name and namespace in other branches
  1. 8 modules/redhen_contact/redhen_contact.module \redhen_contact_user_update_submit()

Update form RedHen contact submit handler.

Updates a related Contact on user update.

Parameters

array $form: Form array.

array $form_state: Form state array.

1 string reference to 'redhen_contact_user_update_submit'
redhen_contact_form_user_profile_form_alter in modules/redhen_contact/redhen_contact.module
Implements hook_form_FORM_ID_alter().

File

modules/redhen_contact/redhen_contact.module, line 1293
Module file for RedHen contacts.

Code

function redhen_contact_user_update_submit($form, &$form_state) {
  $contact = $form_state['redhen_contact'];
  $message = _redhen_contact_user_submission_apply($form, $form_state, $contact);
  redhen_contact_save($contact);

  // Only display this message to CRM users to avoid confusion.
  if (user_access('access redhen contacts')) {
    drupal_set_message($message);
  }
}