function contact_user_presave

Implements hook_user_presave().

File

modules/contact/contact.module, line 236

Code

function contact_user_presave(&$edit, $account, $category) {
  if (isset($edit['contact'])) {
    // Set new value.
    $edit['data']['contact'] = $edit['contact'];
  }
  elseif (!isset($account->data['contact'])) {
    // Use default if none has been set.
    $edit['data']['contact'] = variable_get('contact_default_status', 1);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.