Always set the revision user ID.
This commit is contained in:
parent
2772a7bfe6
commit
4f31aa9ed1
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue