function apply_for_role_entity_delete in Apply for role 7.2
Implements hook_entity_delete()
Purpose: When a user is DELETED (not blocked) all of their applications go away with the deletion.
File
- ./
apply_for_role.module, line 939 - Allows users to apply for roles.
Code
function apply_for_role_entity_delete($entity, $type) {
if ($type == 'user') {
// Delete all relevant role applications.
$result = db_delete('users_roles_apply')
->condition('uid', $entity->uid)
->execute();
}
}