test
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • SP Media Friend
    #146145

    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! :-[

    SP Media Friend
    #324469

    Resolved it.

    vdot2008 Friend
    #468390

    <em>@spmedia 153995 wrote:</em><blockquote>Resolved it.</blockquote>

    Please i will like to know how you solved it. Thanks in advance

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  vdot2008 12 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum