function registration_user_cancel in Entity Registration 7
Same name and namespace in other branches
- 8.2 registration.module \registration_user_cancel()
- 8 registration.module \registration_user_cancel()
- 7.2 registration.module \registration_user_cancel()
Implements hook_user_cancel().
File
- ./
registration.module, line 471
Code
function registration_user_cancel($edit, $account, $method) {
if (isset($account->uid)) {
if ($method == 'user_cancel_reassign') {
db_update('registration')
->fields(array(
'author_uid' => 0,
))
->condition('author_uid', $account->uid)
->execute();
db_update('registration')
->fields(array(
'user_uid' => NULL,
))
->condition('user_uid', $account->uid)
->execute();
}
}
}