php variable current user id
-
Hi,
Thanks a lot for your great plugin!
I have created a query and added it to a page, and I would like the data to be extracted as per the current user id so that the user only sees his own data.
I have added the php variable you mentioned in the FAQ, as follow:
SELECT * FROM ….
WHERE ….
AND post_author='<?php $current_user->ID ?>’>> The Query does display results, however, it does not filter properly on the current user viewing the page.
So for example, Current user 2 is also seeing the lines of user 1.
Is anything that should be added or any other variable to be used to have the filter on current user working properly?
Thanks
Regards
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘php variable current user id’ is closed to new replies.