How can I access the ID of the user that just completed registration form in Gravity Forms?

I am using the Gravity Forms registration plugin to register users on a website I am building and I am trying to add the ID of the newly created user to a URL which gets emailed to specific emails.

I found info herehttp://www.gravityhelp.com/documentation/page/Entry_Object that says you can get the current user ID of the logged in user however the value returns 0 because it seems as though the user isn’t quite logged in at the time this function is called.

Read More

This is how I am currently trying to access the ID

add_action("gform_after_submission", "set_post_content_stuff", 10, 2);

function set_post_content_stuff($entry, $form){

//get id of user submitting the form
$currUserID = $entry['created_by'];

}

Does anyone know how to access the ID from the wp_users table when a new user is registered?

Related posts

Leave a Reply

1 comment