Retrieve the user id of the person who posted the form
-
Hi,
I’m trying to populate a custom table from the data stored in wp_posts (“flamingo_inbound”) and wp_postmeta.
Problem is I don’t understand why post_author is always 0. That is: I red post_author should be the id of the user that created the page where the form is located but no user has (or ever had) that id.
That said, using a cronjob once a day I must populate a custom table, retrieving data from wp_posts. Problem is I need the id of the user who posted the form, not 0 (my users are all logged in) or the id of the user that created the page.
Is there any simple way to record the user id of a user in wp_posts?
The only way I found to retrieve it is to build a giant query involving wp_posts, wp_postmeta and wp_users, but if there’s something simpler, I would like to know.
Thanks!
- The topic ‘Retrieve the user id of the person who posted the form’ is closed to new replies.