You are here

function tmgmt_local_field_attach_insert in Translation Management Tool 7

Implements hook_field_attach_insert().

File

translators/tmgmt_local/tmgmt_local.module, line 675
Main module file for the local translation module.

Code

function tmgmt_local_field_attach_insert($entity_type, $entity) {
  if ($entity_type != 'user' || !array_intersect_key(user_roles(TRUE, 'provide translation services'), $entity->roles)) {
    return;
  }
  tmgmt_local_clear_languages_cache();
}