1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Secure a Page

Discussion in 'XenForo Questions and Support' started by destring, Aug 24, 2011.

  1. destring

    destring New Member

    I'd like to upload a static php page (secured.php) into the root directory and if people were to go this, I'd like it to only allow users who are logged into the forum, and if they aren't logged it, it will display a message saying they must login first.

    Is there a code snippet I can utilize that I can put at the top of my page that will check to see if the user is currently logged in?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Have you considered using a Page node?

    Although it won't be in the root, they support php callback and you can apply permissions based on user or user group.
     

Share This Page