Welcome Guest, Not a member yet? Register   Sign In
Access restrictions to pages using Session.
#3

[eluser]crumpet[/eluser]
I extended the controller class and added a function called _weed_nonusers(). This function will check if the person is logged in and then redirect to the login page if they aren't. So whenever i have a function that is restricted access, I just add $this->_weed_nonusers() at the very beginning of the function.

Also, if you haven't changed your database class to one of hte user created ones in the wiki section that store session info in the database, then you should write a sentry class which validates the session cookie whenever you need to restrict access. Otherwise its easy for someone to go into the cookie and change admin=0 to admin=1 for instance.


Messages In This Thread
Access restrictions to pages using Session. - by El Forum - 09-16-2008, 05:34 AM
Access restrictions to pages using Session. - by El Forum - 09-16-2008, 07:53 AM
Access restrictions to pages using Session. - by El Forum - 09-16-2008, 11:41 AM
Access restrictions to pages using Session. - by El Forum - 09-18-2008, 03:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB