Always set the revision user ID.

This commit is contained in:
Michael Stenta 2021-06-09 10:09:47 -04:00
parent 2772a7bfe6
commit 4f31aa9ed1
1 changed files with 1 additions and 0 deletions

View File

@ -313,6 +313,7 @@ function farm_entity_entity_presave(EntityInterface $entity) {
if ($entity->type->entity->shouldCreateNewRevision() && $entity->getEntityType()->isRevisionable()) {
/** @var \Drupal\Core\Entity\RevisionLogInterface $entity */
$entity->setNewRevision(TRUE);
$entity->setRevisionUserId(\Drupal::currentUser()->getAccount()->id());
$entity->setRevisionCreationTime(\Drupal::time()->getRequestTime());
}
}