carlosuc99 Posted August 4, 2012 Report Share Posted August 4, 2012 Hi, If I go to the pilots list I can change in the pilot callsign and I show pilot information. I want restric this acces. I want to ONLY can see this information the pilots are online or login. If I am not logued I cant see this information. Any Idea? Quote Link to comment Share on other sites More sharing options...
Jeff Posted August 5, 2012 Report Share Posted August 5, 2012 Place this at the very top of any page you don't want non-members to see. <?php if(Auth::LoggedIn() == false) { echo 'We're sorry! You must be a registered member in order to view this page'; return; } ?> Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted August 6, 2012 Moderators Report Share Posted August 6, 2012 Place this at the very top of any page you don't want non-members to see. <?php if(Auth::LoggedIn() == false) { echo 'We're sorry! You must be a registered member in order to view this page'; return; } ?> Jeff, found a mistake. You'll get the error if you don't back slash the '. Cheers! <?php if(Auth::LoggedIn() == false) { echo 'We\'re sorry! You must be a registered member in order to view this page'; return; } ?> Quote Link to comment Share on other sites More sharing options...
Tom Posted August 6, 2012 Report Share Posted August 6, 2012 As LoggedIn() returns a bool and the if statement evaluates as bool anyway, you can shorten it a bit: <?php if(!Auth::LoggedIn()){ echo "We're sorry! You must be a registered member in order to view this page"; return; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.