/**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading components.
  *
  * e.g. `$this->loadComponent('Security');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadComponent('RequestHandler');
     $this->loadComponent('Flash');
     // Use cake Auth component
     $this->loadComponent('Auth', \Builder\Lib\Auth::getDefaultSettings());
     // Allow only display action without sign in.
     $this->Auth->allow([]);
 }
Exemple #2
0
 /**
  * 
  */
 public function initialize()
 {
     parent::initialize();
     /**
      * Load required components
      */
     $this->loadComponent('RequestHandler');
     $this->loadComponent('Flash');
     /**
      * Use cake Auth component
      */
     $this->loadComponent('Auth', \Builder\Lib\Auth::getDefaultSettings());
     /**
      * Allow only display action without sign in.
      */
     $this->Auth->allow(['display']);
 }