Hey guys,
I need to lock down my joomla website to registered users only – I don’t want anything whatsoever to display beyond a logging in box, similar to what you see on the admin cp – like this; http://demo-admin.magentocommerce.com/index.php/admin/.
So after a little thought, I thought of this;
[PHP]<?php
$user =& JFactory::getUser();
if($user->gid == 0)
echo ‘No access allowed message, with content of the login module area’;
else echo ‘(contents of default template index.php here)’;
?>
[/PHP]
But that doesn’t seem to work. After looking into it more, I found that the public front end Group ID is 29, so I tried;
Went by the documentation and inserted the following between the <body></body> tags in the html;
[PHP]<?php
$user =& JFactory::getUser();
if($user->gid == 29)
{
echo ‘No access allowed message, with content of the login module area’;
}
else
{
echo ‘(contents of body in the default joomla/template/default/index.php here)’;
}
?>[/PHP]
All it does is render a blank page. It’s nothing fancy, just the default joomy install.
I’m sure this has to be possible. Please help! :-[