Login | Sign up | Toll-Free: 1-800-752-0455



6 posts by 2 authors in: Forums > CMS Builder
Last Post: July 31, 2017

I'd sure appreciate someone telling me how to format this if
if $CURRENT_USER not admin


By Djulia - July 31, 2017 - edited: July 31, 2017


if ($CURRENT_USER['isAdmin'] == '0') { echo 'not admin; }

if ($CURRENT_USER['isAdmin'] == '1') { echo 'is admin; } else { echo 'not admin; }


thanks, I was trying to have a member modify a system field (hidden) that I guess can't happen.

then I tried this with a pending field and it does not work either

<?php if ($CURRENT_USER['isAdmin'] == '0')<input type="hidden" name="pending" value="1" /><?php endif; ?>

I want to have any listing that is saved by a member to be set to pending.

Any advise would be great.

Can you test that?

<?php $CMS_USER = getCurrentUserFromCMS(); ?>

<?php if($CMS_USER['isAdmin'] == '0'): ?>
  <input type="hidden" name="pending" value="1" />
<?php endif; ?>

oh my YES - thanks so much for your help.