hidden blocks logged in / logged out

Permalink
Hello

Can anyone tell me if there is a block available that will allow me to set certain blocks viewable only when a user (of a specific group) is logged in.
With a default, log in to see this block message, when not logged in.

Thanks

rosie607
 
Steevb replied on at Permalink Reply
Steevb
Use permissions, maybe advanced permissions.

Set things to be seen to whoever you want.
rosie607 replied on at Permalink Reply
rosie607
Thank you. Can I set permissions for a specific block on a page?
Job replied on at Permalink Reply
Job
If the block is in a certain area of a page, you could do this in your template file:

global $u;
if($u->isLoggedIn()) {
 // area stuff
}


Which should stop it displaying if the user isn't logged in.

Permissions may be a better way to go (you'll need advanced I suspect) if the blocks are all over the place, but if its say a right sidebar, I'd go with the code in a template file.