You are here

function party_user_module_implements_alter in Party 7

Same name and namespace in other branches
  1. 8.2 modules/party_user/party_user.module \party_user_module_implements_alter()

Implements hook_module_implements_alter()

We're just going to stop profile2 from doing anything with the user page for now. This should supress the thousands of errors we get on that page.

File

modules/party_user/party_user.module, line 287
Support for linking users to parties

Code

function party_user_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'user_view') {
    unset($implementations['profile2']);
  }

  // Adjust the positions of our party acquisition hooks. This is important for
  // altering values.
  // The post acquisition hook needs to run first so the original acquisition
  // gets updated correctly.
  if ($hook == 'party_acquisition_post_acquisition') {
    $group = $implementations['party_user'];
    unset($implementations['party_user']);
    $implementations = array(
      'party_user' => $group,
    ) + $implementations;
  }
  elseif (substr($hook, 0, 17) == 'party_acquisition') {
    $group = $implementations['party_user'];
    unset($implementations['party_user']);
    $implementations['party_user'] = $group;
  }
}