if CURRENT_USER not admin

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

By dlsweb - July 31, 2017

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

Thanks

By dlsweb - July 31, 2017

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

By dlsweb - July 31, 2017

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.

By Djulia - July 31, 2017

Can you test that?

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

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

By dlsweb - July 31, 2017

oh my YES - thanks so much for your help.