You are here

function ginvite_uninstall in Group 7

Implements hook_uninstall().

File

modules/ginvite/ginvite.install, line 49
Install, update and uninstall functions for the Group invite project.

Code

function ginvite_uninstall() {
  db_drop_field('group_membership', 'invited_on');
  db_drop_field('group_membership', 'invited_by');

  // If Group is still enabled, we remove all memberships that are still set to
  // invited. Otherwise, we can't run this code without causing a WSOD.
  if (module_exists('group')) {
    group_membership_delete_multiple(array_keys(group_memberships(array(
      'status' => 'invited',
    ))));
  }
}