I would like to check if my user have filled certain fields in his profile before he can access any action of any controller. For example
if(empty(field1) &
Just add in config file into $config array:
'on beforeAction' => function ($event) { echo "Hello"; },