Want to hide a Content Area until users are registered

Permalink
I've posted elsewhere about a problem I have with a client who wants to display certain info on a page to all site users but have additional info displayed when the user is registered & logged in.

I was advised to use this code to show the additional content, which someone helpfully gave me but don't have a clue how to implement it:

<?php
  $u = new User();
  if($u->isRegistered()); {
      // stuff to show when logged in 
  }
?>


This is what I want to "hide" inside this area

<?php  
$a = new Area('Event Product');
$a->display($c); ?>


Can anyone help me. I keep getting fatal errors when I try to just paste it on the line // stuff to show when logged in

PassionForCreative
 
12345j replied on at Permalink Reply
12345j
An easier way would be to enable advances peermissions and then set the permission that only reviewers users, or some other group, can view
PassionForCreative replied on at Permalink Reply
PassionForCreative
How do I do this? I don't know how to set up advanced permissions to show certain areas of a page & not others.
12345j replied on at Permalink Best Answer Reply
12345j
Add this code to config/site.php
define('PERMISSIONS_MODEL', 'advanced');
to enable advanced permissions and Then click on the block that you want to restric access and click permissions. Should allow more control. Also, look here for more infohttp://www.concrete5.org/documentation/how-tos/screencast-how-to-cr...
frz replied on at Permalink Reply
frz