Re: [jimmy.g] make page membership plugin ready
Hi Jimmy,
To allow a user to see only his or her own records you might try something like this inside your foreach loop:
<?php if ($record['createdByUserNum']== @$CURRENT_USER['num']): ?>
Your record listing code goes here
<?php endif ?>
To restrict access to the page to registered users only you might try this after the load records code at the top of your page. It will direct visitors to your login page before they can access the restricted page:
<?php if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); } ?>
Hope that gets you going.
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php