No. of Page Views

12 posts by 4 authors in: Forums > CMS Builder
Last Post: January 7, 2010   (RSS)

Re: [equinox69] No. of Page Views

By Chris - January 7, 2010

Hi folks,

To determine if the current user is the "author" of a record, you can test if $record['createdByUserNum'] == $CURRENT_USER['num']:

<?php if ($record['createdByUserNum'] == $CURRENT_USER['num']): ?>Only the author will be able to see this<?php endif ?>

You may want to also allow admins to see your protected information:

<?php if ($record['createdByUserNum'] == $CURRENT_USER['num'] || $CURRENT_USER['isAdmin']): ?>Author and administrators will be able to see this<?php endif ?>

I hope this helps! Please let me know if you have any questions.
All the best,
Chris