function restful_user_delete in RESTful 7.2
Same name and namespace in other branches
- 7 restful.entity.inc \restful_user_delete()
Implements hook_user_delete().
File
- ./
restful.entity.inc, line 117 - Contains entity related code.
Code
function restful_user_delete($account) {
// Search for all the cache fragments with our entity id.
$query = new \EntityFieldQuery();
$query
->entityCondition('entity_type', 'cache_fragment')
->propertyCondition('type', 'user_id')
->propertyCondition('value', $account->uid);
$hashes =& drupal_static('restful_entity_clear_hashes', array());
$new_hashes = CacheFragmentController::lookUpHashes($query);
array_walk($new_hashes, '_restful_entity_clear_all_resources');
$hashes += $new_hashes;
restful_register_shutdown_function_once('restful_entity_clear_render_cache');
}