/**
* Constructor hook method
* @param array $config The configuration settings provided to this
* component
* @return void
* @see http://api.cakephp.org/3.3/class-Cake.Controller.Component.html#_initialize
*/
public function initialize(array $config)
{
parent::initialize($config);
//The authorization error is shown only if the user is already logged
// in and he is trying to do something not allowed
if (!$this->user('id')) {
$this->config('authError', false);
}
}