Session Validation before come to controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Session Validation before come to controller (/showthread.php?tid=70197) |
Session Validation before come to controller - sanjaya - 03-06-2018 I need Valid is user login form enter below company controller. Please help me to do this session validate. Company controller and login model are below here. Controller Code: <?php Login Model Code: <?php RE: Session Validation before come to controller - sanjaya - 04-11-2018 I have try this app in another hosting account. its work fine. Any one can help me please RE: Session Validation before come to controller - InsiteFX - 04-12-2018 You would do the check login in the Company Controller's constructor. RE: Session Validation before come to controller - ranjithsiji - 04-12-2018 A method we are using in our project is we created a library called authlibrary. We loaded it in autoload. Then we are calling a check function in the constructor of the function. that is it. $this->authlib->check_user(); on the constructor of the controller. RE: Session Validation before come to controller - InsiteFX - 04-13-2018 A better method would be called restrict() Which would check the user and then do the restriction on them. PHP Code: /** The restrict method would check the users groups to make sure that it was the Admin. |