• Resolved effexdon

    (@effexdon)


    Hello,

    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.

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter effexdon

    (@effexdon)

    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; ?>

    ENJOY

Viewing 1 replies (of 1 total)
  • The topic ‘[NextGen Gallery] user must login to see gallery’ is closed to new replies.