You are here

function smart_ip_uninstall in Smart IP 8.3

Same name and namespace in other branches
  1. 8.4 smart_ip.install \smart_ip_uninstall()
  2. 6.2 smart_ip.install \smart_ip_uninstall()
  3. 6 smart_ip.install \smart_ip_uninstall()
  4. 7.2 smart_ip.install \smart_ip_uninstall()
  5. 7 smart_ip.install \smart_ip_uninstall()

Implements hook_uninstall().

File

./smart_ip.install, line 11
Install, update and uninstall functions for the image module.

Code

function smart_ip_uninstall() {

  /** @var \Drupal\user\UserData $userData */
  $userData = \Drupal::service('user.data');

  // Delete all the Smart IP location in users' user_data
  $userData
    ->delete('smart_ip');

  // Remove all stored states
  \Drupal::state()
    ->deleteMultiple([
    'smart_ip.request_db_error_source_id',
    'smart_ip.request_db_error_message',
  ]);
}