function restful_user_update in RESTful 7.2
Same name and namespace in other branches
- 7 restful.entity.inc \restful_user_update()
Implements hook_user_update().
File
- ./
restful.entity.inc, line 100 - Contains entity related code.
Code
function restful_user_update(&$edit, $account, $category) {
// 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');
}