ACL and Login Authentification CodeIgniter samples
Usually when you are building a program, the login/logout functionality is a must we always have to go through, so this quick tutorial will focus on this functionality, taking advantage of the benefits of using CodeIgniter instead of doing it from scratch in PHP. Below in CodeIgniter, before accessing home page via home controller we check if user_id is connected : if not it is redirected to login controller. This class session is part of the codeIgniter core (see configuration) . Please note that all the application controllers(home/login) are located within the same folder controller.
If we are working in HMVC combined to CodeIgniter, so we will have a cross module calls like below in function __construct.
ACL : Access control List mecanism integrated to CodeIgniter :
ACL is the main controller which is dipatching permissions and roles to every user accessing controllers. In this module, ACL use an inherited view call declared in MY_Loader see this->load->view with 4 parameters below.
In this module, ACL use an inherited view call declared in MY_Loader where HMVC make MX_ inheritance too.
So do not forget to add this function surcharged view in HMVC Loader in Application/Core folder to use this ACL module with HMVC CodeIgniter variation.