function contact_user_update

Implements hook_user_update().

File

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

Code

function contact_user_update($account) {
  if (isset($account->contact)) {
    Drupal::service('user.data')
      ->set('contact', $account
      ->id(), 'enabled', (int) $account->contact);
  }
}