function simplenews_user_cancel in Simplenews 7
Same name and namespace in other branches
- 7.2 simplenews.module \simplenews_user_cancel()
Implements hook_user_cancel().
File
- ./
simplenews.module, line 966 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_user_cancel($edit, $account, $method) {
// Deactivate subscriber when account is disabled via cancel user.
if ($account) {
$query = db_update('simplenews_subscriber')
->fields(array(
'activated' => SIMPLENEWS_SUBSCRIPTION_INACTIVE,
))
->condition('uid', $account->uid)
->execute();
}
}