• 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)
  • Plugin Author Eli

    (@scheeeli)

    My best guess based on the description you provided is that your query might actually end like this:
    AND post_author=<‘<?php $current_user->ID ?>’

    If not then there must be something else about your query that is including those additional results. Is there any way that you could let me see the whole query or the live report so I can get a better idea of what might be going on here?

    You can email me with any private details that you don’t wan tto post on this public forum:
    support AT supersecurehosting DOT com

Viewing 1 replies (of 1 total)
  • The topic ‘php variable current user id’ is closed to new replies.