[eluser]suntrop[/eluser]
Hi.
I am building my 2nd CI website and want to implement my own auth system. I wasn't happy about Ion-Auth and Tank-Auth.
Anyway, I have a MY_Controller and an Admin_Controller, that extends the MY_Controller. All admin pages do need to check if the user is logged-in and if he has the right permission to see the page.
So I want to check in the Admin_Controller (that way don't have to repeat it in every Controller) both: log-in status and permission.
But how? :-)
Lets say the page "/services/support/17-john" is requested. I have to check if the user is logged-in and if he is john, since only the user itself can view his support page.
How can I check that in the Admin_Controller?
I really hope someone knows what I mean :-) … and of course can help
Thanks!