gform_userregistration_associate_entry_with_user

Description

Used to determine if the entry should be associated with newly created user.

Usage

add_filter( 'gform_userregistration_associate_entry_with_user', 'your_function_name', 10, 5 );

Parameters

  • $update_entry_creator bool

    If entry creator should be associated with user.

  • $user_id int

    New user ID.

  • $feed Feed Object

    The current feed.

  • $entry Entry Object

    The current entry.

  • $form Form Object

    The current form.

Examples

add_filter( 'gform_userregistration_associate_entry_with_user', 'associate_entry', 10, 5 );
function associate_entry( $update_entry_creator, $user_id, $feed, $entry, $form ){
  return true;
}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in User Registration version 4.0.9.

Source Code

This filter is located in GF_User_Registration::create_user() in gravityformsuserregistration/class-gf-user-registration.php.