function opigno_moxtra_user_update in Opigno Moxtra 8
Same name and namespace in other branches
- 3.x opigno_moxtra.module \opigno_moxtra_user_update()
Implements hook_ENTITY_TYPE_update().
Updates user info in the Moxtra.
File
- ./
opigno_moxtra.module, line 661 - Contains opigno_moxtra.module.
Code
function opigno_moxtra_user_update(EntityInterface $entity) {
/** @var \Drupal\user\Entity\User $entity */
$user_active = $entity
->isActive();
$connector = \Drupal::service('opigno_moxtra.connector');
if ($user_active && $connector
->checkSettings()) {
$moxtra = \Drupal::service('opigno_moxtra.moxtra_api');
$moxtra
->setUser($entity);
}
}