function certificate_user_delete in Certificate 4.x
Same name and namespace in other branches
- 8.3 certificate.module \certificate_user_delete()
- 7.3 certificate.module \certificate_user_delete()
Implements hook_user_cancel().
@todo fix d8
File
- ./
certificate.module, line 140
Code
function certificate_user_delete($account) {
return;
$sql = "DELETE FROM {certificate_snapshots} WHERE uid = :uid";
// TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
// You will need to use `\Drupal\core\Database\Database::getConnection()` if you do not yet have access to the container here.
\Drupal::database()
->query($sql, array(
':uid' => $account->uid,
));
}