Moderators mark1million Posted March 5, 2011 Moderators Report Share Posted March 5, 2011 Hi, Can i show the login page instead of the default login message for protected content? <?php if(Auth::LoggedIn() == false) { echo '<div class="mcright" id="error">Please login to view this page. You can login <a href="http://www.easyjetva.com/index.php/login">Here</a></div></div>'; return; } ?> Quote Link to comment Share on other sites More sharing options...
Strider Posted March 5, 2011 Report Share Posted March 5, 2011 I am sure you can, the code would be simple. You just need code that shows the login form and place that code in the if statement. Quote Link to comment Share on other sites More sharing options...
Tom Posted March 5, 2011 Report Share Posted March 5, 2011 <?php if(Auth::LoggedIn() == false) { echo '<div class="mcright" id="error">Please login to view this page.'; Template::Show('login_form.tpl'); echo '</div></div>'; return; } ?> Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted March 5, 2011 Author Moderators Report Share Posted March 5, 2011 Thanks Tom i was nearly there with that just had some syntax formatting errors Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 6, 2011 Administrators Report Share Posted March 6, 2011 You can do that, or output a piece of javascript which redirects to the login page 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.