Configuring User Registration steps to change the ‘created by’ field

When the Gravity Forms User Registration Add-On creates a new user account the entry’s ‘created by’ field is left as the anonymous IP address. This can affect the configuration of the workflow emails.

The following snippet will set the ‘created by’ meta value on the entry to the id of the newly created user account.

1
2
3
4
add_action("gform_user_registered", "sh_gform_user_registered", 10, 4);
function sh_gform_user_registered($user_id, $config, $entry, $user_pass) {   
    GFAPI::update_entry_property( $entry['id'], 'created_by', $user_id );
}

When is this needed?

Use the gform_user_registered action with a snippet like the one above when:

  • An existing (logged-in) user submits the form and the form triggers a User Registration feed that creates a new user. In this case, the workflow must assign steps based on the newly created user, not the original submitter.
  • You are building a multi-user onboarding flow (e.g., an admin creates user accounts for others) and the newly created user needs to “own” the entry in order to continue the process.

When is this not needed?

You do not need to hook to the gform_user_registered action when:

  • An anonymous (non-logged-in) user submits the form, and a new user is created.
    The system already sets the new user as the entry creator by default.
  • You don’t need to change ownership of the entry — the current creator aligns with your workflow needs.
  • Your setup meets any of the following:
    • The form does not register a new user.
    • The new user isn’t meant to interact with the entry or workflow.
    • Your workflow logic depends on the original submitter remaining the entry creator.