You are here

function inactive_user_uninstall in Inactive User 7

Same name and namespace in other branches
  1. 5 inactive_user.install \inactive_user_uninstall()
  2. 6 inactive_user.install \inactive_user_uninstall()

Implements hook_uninstall().

File

./inactive_user.install, line 80
The inactive user module controls inactive users.

Code

function inactive_user_uninstall() {
  variable_del('inactive_user_preserve_content');
  variable_del('inactive_user_timestamp');
  $query = db_select('variable', 'v')
    ->fields('v', array(
    'name',
  ))
    ->condition('name', 'inactive_user_%', 'LIKE')
    ->execute()
    ->fetchAll();
  foreach ($query as $row) {
    variable_del($row->name);
  }
  drupal_set_message(t('Inactive user has been uninstalled.'));
}