CodeIgniter Forums
DX Auth showing views although not logged-in - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: DX Auth showing views although not logged-in (/showthread.php?tid=26633)



DX Auth showing views although not logged-in - El Forum - 01-19-2010

[eluser]Mithun[/eluser]
Hi All,

I Have a problem with DX_Auth library, I have setup it, successfully able to log in and log out, change passwords etc, issue is with other controllers, whenever i tries to access any other controller method say <base_url>/opportunities/index.php i wss able to view it with out loggedin.
Do i need to check for log in like
Code:
if($this->dx_auth->is_logged_in())
in each controller or am I doing anything wrong?


DX Auth showing views although not logged-in - El Forum - 01-19-2010

[eluser]flaky[/eluser]
Yes in each of the controllers
or you create the My_Controller or some other controller and extend the controllers that need user privileges with the My_Controller.


DX Auth showing views although not logged-in - El Forum - 01-28-2010

[eluser]Mithun[/eluser]
Thank you flaky