Membership records per user
3 posts by 1 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: February 28, 2019 (RSS)
By Jesus - February 28, 2019
Hi,
I'm working with my membership plugin and here's what I'm trying to do.
I've a table with documents (pdf, docx files) assigned to specific CMSBuilder users.
I want to display those files based on the user signup as a list.
I know how to do this without the membership plugin as I can use the where statement on my load records
'where' => "category='my_category'",
but, how can I do this using the Membership plugin to only display records per user to signed users?
Thank you for clarify this to me.
Jesus
By Jesus - February 28, 2019
Should I use $CURRENT_USER as a filter?
'where' => "cliente='$CURRENT_USER'",
this way I'll only get records from the user logged in.
Am I correct? (will give it a try) ;)
By Jesus - February 28, 2019
An old thread helped me with this: https://www.interactivetools.com/forum/forum-posts.php?postNum=2202242#post2202242
My final code:
'where' => mysql_escapef(" cliente = ? ", $CURRENT_USER['num'] ),
Thank you!
PS
If someone thinks I still need an adjustment or there's a better way, please feel free to share it!