• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Building application structure - problems with controllers?

Why would you do it that way? The problem is self-caused.

When someone logs in, you should store their data in session and then redirect back to where they were before logging in, or a profile page or something. Now they are logged in and you can display different info based on their userlevel, or however you have it set up. It's a new request (because of the redirect), so you would be able to use any methods in your home controller.

So, they are on the homepage and log in, which sends their form data to the login controller. Login Controller saves their user information in session and then redirects them back to the homepage where they were when they logged in. Now they are on the same page as they were before, but logged in (in which case you wouldn't display the login form anymore, kind of like how it is on this site.)

Messages In This Thread
Building application structure - problems with controllers? - by El Forum - 07-12-2012, 01:57 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.