Jump to content

Recommended Posts

Posted

Dear Forum Members hi i just wanted to ask that i have created Fleet Pages wit downloading link in it so how i can protect downloads from out siders i wanted to allow downloads only for Registered Pilots i have created different pages from admin center what should we need to put in those pages so it will show downloading link to Pilots only.

for example page created like

http://www.websitename/index.php/pages/Fleet

Any IDea

Regards

Ahmad

  • Moderators
Posted

If you have created a page in the admin section then you have the option to make it public, ie logged in or not. Then just make sure there is no tick in the box and that page can only be accessed by members.

  • Moderators
Posted

If not you can modify this code below to suite your needs.

<?php
if(Auth::LoggedIn() == false)
{
  echo 'Please login to view this page.';
  echo '<br /><br /><br />';
  Template::Show('login_form.tpl');
  return;
}
?>

  • Moderators
Posted

Just put that code at the top of any tpl you only want logged in pilots to access. If they are not logged in then it will display them the login form, you can if you want create another login form to redirect them to the requested page.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...