Commit c1231b57 authored by Liam Morland's avatar Liam Morland
Browse files

Merge branch '1.0.x' into 'prod/1.0.x'

Tag 1.0.1

See merge request !12
parents b1ad5a19 55669104
......@@ -2,6 +2,7 @@
namespace Drupal\uw_ct_contact\EventSubscriber;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\core_event_dispatcher\Event\Entity\EntityUpdateEvent;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
......@@ -86,6 +87,12 @@ class UwCtContactEventSubscriber implements EventSubscriberInterface {
$profile->save();
}
}
// Invalidate OFIS cache if Contact is unpublished
// and there is watiam value provided.
if (!$contact->isPublished() && $watiam = $contact->field_uw_ct_contact_watiam_id->value) {
Cache::invalidateTags(['uw_wcms_ofis:user:' . $watiam]);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment