You are here

function oauth_user_delete in OAuth 1.0 8

Implements hook_user_delete().

File

./oauth.module, line 10
Hook implementations for OAuth module.

Code

function oauth_user_delete(Drupal\Core\Entity\EntityInterface $user) {

  // Delete all consumers related to a user.
  db_delete('oauth_consumer')
    ->condition('uid', $user
    ->id())
    ->execute();
}