Moderators mark1million Posted March 5, 2011 Moderators Report 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
Strider Posted March 5, 2011 Report 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
Tom Posted March 5, 2011 Report 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
Moderators mark1million Posted March 5, 2011 Author Moderators Report Posted March 5, 2011 Thanks Tom i was nearly there with that just had some syntax formatting errors Quote
Administrators Nabeel Posted March 6, 2011 Administrators Report Posted March 6, 2011 You can do that, or output a piece of javascript which redirects to the login page Quote
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.