returning redirect from parent's function. |
Hi, I want to make simple authentication checking method in BaseController.php so it can be accessed by another controller like this:
PHP Code: protected function mustLoggedIn() PHP Code: public function beranda() How to implement login check like that in CI4?
Hello,
The 'exit()' call after the 'return' will never be executed. PHP Code: protected function isLoggedIn() PHP Code: public function beranda() Vincent
I think you might want to check out Controller Filters. They are designed to handle exactly that type of situation.
|
Welcome Guest, Not a member yet? Register Sign In |