I would like to create a new entry via a hook / job. When I trigger the hook as user X, the createdById is the ID of user X, although I specified createdById of user Y when creating the entry.
As an example, when I create a note.
In my case, the Id is 1 for Admin.
As an example, when I create a note.
PHP Code:
$this->entityManager->createEntity('Note', [
"createdById" => "6387c5807e6d7db4a", //User Y
"post" => $post,
"type" => Note::TYPE_POST,
"parentId" => $this->getId(),
"parentType" => $this->getEntityType(),
"relatedId" => $entity->getId(),
"relatedType" => $entity->getEntityType()
]);
Comment