Only Members Can See Members list

How do I modify home page that non-members cannot see a list of members? It locates between 'Videos' and 'Uploads'.

Thank you for help....

Comments

  • edited April 2016
    Do you just want to omit the "members" Menu Link, or actually fully secure the members page?

    To omit the link, do this:

    1. In your cumulus-home\cc-content\themes\default\blocks folder, edit "header.phtml"

    2. Change this:


    <nav>
    <a href="<?=HOST?>/videos/"><?=Language::GetText('videos')?></a>
    <a href="<?=HOST?>/members/"><?=Language::GetText('members')?></a>
    <?php if ($config->enableUserUploads): ?>
    <a href="<?=HOST?>/account/upload/"><?=Language::GetText('upload')?></a>
    <?php endif; ?>
    </nav>

    to this:

    <nav>
    <a href="<?=HOST?>/videos/"><?=Language::GetText('videos')?></a>
    <?php if ($loggedInUser): ?>
    <a href="<?=HOST?>/members/"><?=Language::GetText('members')?></a>
    <?php endif; ?>
    <?php if ($config->enableUserUploads): ?>
    <a href="<?=HOST?>/account/upload/"><?=Language::GetText('upload')?></a>
    <?php endif; ?>
    </nav>


    However, this just prevent the link from showing up. If someone goes to /members in their browser directly, they could still see the members list.

    That of course can be fixed by wrapping a <?php if ($loggedInUser): ?> statement around the logic in the members.phtml.
  • edited April 2016
    Hi GreenMotion,

    Yes, I just want actually fully secure the members page.

    It works!!!!! Thank you very much....

    I have another question:
    After I enter 'test' in 'search' box, it lists some thumbnails with description 'test xxx' .

    I would like to add firstName on that screen, It does not show up...

    In search.phtml, this is original code:

    .......a href="<?=HOST?>/members/<?=$video->username?>/" title="<?=$video->username?>"><?=$video->username?>


    I modify as the following:
    .......a href="<?=HOST?>/members/<?=$video->username?>/" title="<?=$video->username?>"><?=$video->username?>

    .......a href="<?=HOST?>/members/<?=$video->firstName?>/" title="<?=$video->firstName?>"><?=$video->firstName?>

    How do I correct it? Thank you for your time.....
This discussion has been closed.