[resolved] [NextGen Gallery] user must login to see gallery (2 posts)

  1. EffexDon
    Posted 7 years ago #


    I am trying to setup my site so that you have to be logged in / registered in order to see the gallies in a post. I imagine that there is some sort of cookie that can be used in an if statement, but I'm still learning php (self taught) so some of the syntax is a little confusing.

    I am using NextGen gallery, but I'm pretty sure that there is a generic if statement I could use and enter the code to call NextGen from within it. (almost thinking something along the lines of the code used to block leaving comments)

    I have seen similar questions to this, but no answers. If any moderators feel this should be combined with some of the many similar questions, please let me know.

    I will keep searching for an answer, but ANY help will be greatly appreciated.


  2. EffexDon
    Posted 7 years ago #

    I found something that worked. Hopefully this statment helps answer the many similar questions I have seen.

    <?php if ( $user_ID ) : ?>
    <!-- First Condition - If Logged In -->
    <?php else : ?>
    <!-- Second Condition - If NOT Logged In - which usually leads back to login page-->
    <?php endif; ?>


Topic Closed

This topic has been closed to new replies.

About this Topic