You are here

function matomo_user_presave in Matomo Analytics 7.2

Implements hook_user_presave().

File

./matomo.module, line 447
Drupal Module: Matomo

Code

function matomo_user_presave(&$edit, $account, $category) {
  if (isset($edit['matomo']['custom'])) {
    $edit['data']['matomo']['custom'] = $edit['matomo']['custom'];
  }

  // Remove old piwik setting to complete migration to matomo.
  if (isset($edit['data']['piwik'])) {
    unset($edit['data']['piwik']);
  }
}