1.20.x contact.module contact_user_presave($account)

Implements hook_user_presave().

File

modules/contact/contact.module, line 320
Enables the use of personal and site-wide contact forms.

Code

function contact_user_presave($account) {
  $config = config('contact.settings');
  if (isset($account->contact)) {
    $account->data['contact'] = $account->contact;
  }
  elseif (!isset($account->data['contact'])) {
    $account->data['contact'] = $config->get('contact_default_status');
  }
}