Forum

Thread tagged as: Problem, Members

Members, access secure page.

Ive added Member login, to a page to show preview images. But it needs tags on all pages.

just want to give access to a single secure page, and not have to add tags too all pages.

If I add include(PERCH_PATH.'/addons/apps/perch_members/runtime.php'); to perch/config/apps.php I find if not login in, I can see the home/index page. :(

      https://mysite.com/members/login.php?r=/index.php
      Not Found
      The requested URL /members/login.php was not found on this server.

please help, just want to grant access to one page on the website.

my code below

tony

<div class="container">

    <?php include"menu.php" ?>

    <div class="contact-page main grid-wrap">

        <header class="grid col-full">
            <hr>
            <?php if (perch_member_logged_in()) { ?>
                <div style="float:right;"><button onclick="logout()">Logout</button></div>
            <?php }?>
        </header>

        <div align="center" style="min-height:600px;">
        <section class="grid  mq3-col-full">
            <h2>S/S15 Preview</h2>
            <p></p> 
            <br>
            <br>
            <?php if (perch_member_logged_in()) { ?>

            <h4>Comming soon</h4>

            <?php
                }else{
                    perch_members_login_form(); 
                }
            ?>  

        </section>
        </div>      
    </div>

    <div class="divide-top">
        <?php include("footer.php");    ?>
    </div>

</div>
Tony Monckton

Tony Monckton 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm not clear on what's not working. Could you explain this part?

I find if not login in, I can see the home/index page. :(

Found the solution:

in perch/adons/apps/perch_members/runtime.php

comment out line 20: //perch_members_check_page_access();

this works perfectly.

tony