Answer the question
In order to leave comments, you need to log in
How to implement restriction of access rights on CodeIgniter?
Good afternoon!
I have an old CodeIgniter project that needs to be finished.
Now there you need to add a restriction of access rights to the admin panel for each user.
Can you please tell me how to make such a controller that will be launched on each page of the admin panel and check if the user has rights to this page?
I consider it stupid to prescribe the same code in the constructor of each controller, so I hope for the help of the community.
Thank you in advance!
Answer the question
In order to leave comments, you need to log in
Hooks are used for this purpose. You can read about them here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question