Should i check User Logged In session on every functions of admin controller? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Should i check User Logged In session on every functions of admin controller? (/showthread.php?tid=39977) |
Should i check User Logged In session on every functions of admin controller? - El Forum - 03-26-2011 [eluser]Varadha[/eluser] Hi, I am a beginner in code igniter. I have my controllers basic setup as follows: application/core/MY_Controller.php ----------------------------------- Code: class MY_Controller extends CI_Controller { application/controllers/Admin_Controller.php --------------------------------------------- Code: class Admin_Controller extends MY_Controller { application/controllers/admin.php --------------------------------- Code: class Admin extends Admin_Controller { It works fine with login credentials. If i access the members_area() without login, it just loads the welcome view. I have to include many number of functions in the admin controller but all should be accessible after login only. Should i verify the login session for each and every function? Is there any other way to solve this? I need help on this. Please guide me :question: . Regards Varadha Should i check User Logged In session on every functions of admin controller? - El Forum - 03-26-2011 [eluser]Atharva[/eluser] Why not to put Code: $this->is_logged_in(); Should i check User Logged In session on every functions of admin controller? - El Forum - 03-28-2011 [eluser]SPeed_FANat1c[/eluser] [quote author="Atharva" date="1301158242"]Why not to put Code: $this->is_logged_in(); thats good idea I also always write on every admin function where I need security - if(is loggedin) then do something else login Should i check User Logged In session on every functions of admin controller? - El Forum - 03-29-2011 [eluser]Varadha[/eluser] Thanks guys. Now working fine. |