Welcome Guest, Not a member yet? Register   Sign In
Login check
#4

[eluser]mddd[/eluser]
Then maybe you should change your library a little bit. In stead of the library automatically redirecting to the login controller, you could create a method in the library called 'is_logged_in()'. Then you can use this information in each controller. It makes the library more useful than just a simple 'redirect if not logged in' function.

The nice thing about that is that you can do things like
Code:
function show_some_info()
{
  if ($this->login_model->is_logged_in())
  {
    // show some private information here
  }
  else
  {
    // show a message to the public here, like "if you were logged in, you could see more information!"
  }
}


Messages In This Thread
Login check - by El Forum - 04-16-2010, 04:10 AM
Login check - by El Forum - 04-16-2010, 04:21 AM
Login check - by El Forum - 04-16-2010, 04:24 AM
Login check - by El Forum - 04-16-2010, 04:30 AM
Login check - by El Forum - 04-16-2010, 06:28 AM
Login check - by El Forum - 04-16-2010, 06:33 AM
Login check - by El Forum - 04-16-2010, 07:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB