function user_revision_entity_info_alter in User Revision 7
Same name and namespace in other branches
- 7.2 user_revision.module \user_revision_entity_info_alter()
Implements hook_entity_info_alter().
File
- ./
user_revision.module, line 220 - Enables user revision.
Code
function user_revision_entity_info_alter(&$entity_info) {
module_load_install('user_revision');
$entity_info['user']['revision table'] = 'user_revision';
$entity_info['user']['entity keys']['revision'] = 'vid';
$entity_info['user']['controller class'] = 'UserRevisionController';
$schema = user_revision_schema();
foreach ($schema['user_revision']['fields'] as $k => $field) {
$entity_info['user']['schema_fields_sql']['revision table'][] = $k;
}
}