mltpilot Posted February 2, 2016 Report Share Posted February 2, 2016 How can I make a page only accessible when a pilot is logged in or registered? Thanks in advance Quote Link to comment Share on other sites More sharing options...
smokey68 Posted February 2, 2016 Report Share Posted February 2, 2016 If you are meaning you do not want the information on a page not to be shown unless a pilot is logged in you will use the code below and i have told you where you will put your content you want logged in users to see and for users logged out to see <?php require('the directory of your codon.config.php file'); // Call the phpVMS config file if(Auth::LoggedIn()) { //the data you want to show if he is logged in goes here } else { //the data you want to show if he is not logged in goes here ?> If you are wanting to show a link only to pilots logged in but not to a user visiting page or because they are logged out use this <?php if(Auth::LoggedIn() == true){ ?> //<a href="#">My Custom Link</a> <?php } ?> Sincerely, Vince Quote Link to comment Share on other sites More sharing options...
mltpilot Posted February 2, 2016 Author Report Share Posted February 2, 2016 W here should i input this code? Quote Link to comment Share on other sites More sharing options...
smokey68 Posted February 2, 2016 Report Share Posted February 2, 2016 what are you trying to edit so i can assist you better Quote Link to comment Share on other sites More sharing options...
mltpilot Posted February 2, 2016 Author Report Share Posted February 2, 2016 vistajetvirtual.com schedules page Quote Link to comment Share on other sites More sharing options...
smokey68 Posted February 2, 2016 Report Share Posted February 2, 2016 ok use my second option go to layout file and put the link to the schedules page where i have "My custom link" that line there is where the link of the schedules page needs to be Quote Link to comment Share on other sites More sharing options...
mltpilot Posted February 2, 2016 Author Report Share Posted February 2, 2016 Didn't work, is there another option? Iput the code after the link Quote Link to comment Share on other sites More sharing options...
mltpilot Posted February 2, 2016 Author Report Share Posted February 2, 2016 Ok! Problem Solved! Thanks 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.