Update author of a created entity by anonymous

Created on 19 May 2025, 15 days ago

Problem/Motivation

I am searching to update the author of a new entity

Steps to reproduce

I react on the event content_entity_insert

Proposed resolution

I want an action to set the author of this new entity

Remaining tasks

I don't manage to update the created entity.
I don't find how to access to the author field to set the value to a specific user.
What is the solution ?

💬 Support request
Status

Active

Version

2.1

Component

User interface

Created by

🇫🇷France alex.amtr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @alex.amtr
  • 🇫🇷France alex.amtr

    Ok, then I managed to succeed.
    You just have to update the field uid of the created entity.
    I am sorry for my stupid question. I've spent a lot of time for this result.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Yes, finding the field names for all entity types anywhere can be tricky. A good place is the "Manage form display" page for the entity and bundle you're looking for, e.g. /admin/structure/types/manage/article/form-display for article nodes. That shows you the machine name of all the available fields.

Production build 0.71.5 2024