[eluser]Patrick Reck[/eluser]
Hello!
I'm developing a new website using HMVC patterns. I was wondering how to protect <b>whole</b> modules against users who is not logged in.
As far as I can see, putting the following code in the <i>Controllers constructor</i> seems to work:
Code:
if ($this->session->userdata('is_logged_in') == NULL) { exit; }
Is this a safe approach to keep non-users out?