I have the user registration plugin installed ( V1.4 )
The form I have has both user and post data. An anonymous user "signs up" and creates a post. Currently, the user is created and the post is created. However, the new user is not assigned to newly created post.
I have not been able to figure out what hook to use in order to accomplish this.
This is sort of what I want to do:
http://www.gravityhelp.com/forums/topic/can-a-user-create-an-account-and-submit-post-with-the-same-form
What I have so far:
// set post type and publish status
add_filter("gform_post_data", "ihearditbefore_gform_post_data", 10 , 2 );
function ihearditbefore_gform_post_data( $post_data, $form ){
$post_data['post_type'] = 'person';
$post_data['post_status'] = 'publish';
return $post_data;
}
I notice $form
has a post_user [postAuthor] => 13
but it's always the same. I would need to change that somehow — via what hook?