/var/www/vhosts/ihelp.ro/_OLD/src/Controller
NameSizeModeActions
Component/-0755rm
AppController.php23300644editdlrm
CauseImagesController.php34080644editdlrm
CausesController.php21720644editdlrm
ErrorController.php17680644editdlrm
PagesController.php6160644editdlrm
ProfilesController.php43200644editdlrm
UsersController.php56490644editdlrm
Edit: /var/www/vhosts/ihelp.ro/_OLD/src/Controller/AppController.php (2330B)
loadComponent('FormProtection');` * * @return void */ public function initialize(): void { parent::initialize(); $this->loadComponent('RequestHandler'); $this->loadComponent('Flash'); // Add this line to check authentication result and lock your site $this->loadComponent('Authentication.Authentication'); $this->loadComponent('Authorization.Authorization'); /* * Enable the following component for recommended CakePHP form protection settings. * see https://book.cakephp.org/4/en/controllers/components/form-protection.html */ //$this->loadComponent('FormProtection'); // $is_authenticated = $this->Authentication->getIdentity(); // $this->set(compact("is_authenticated")); } # -------------------------------- # App > beforeFilter # -------------------------------- public function beforeFilter(EventInterface $event) { $this->_setUserAuth(); } private function _setUserAuth(): void { $auth = $this->Authentication->getIdentity(); $this->userAuth = $auth; $this->set('userAuth', $this->userAuth); } }