getAuthorizationChecker()->isGrantedAsProducer($userCurrent); $producer = null; if ($isUserCurrentGrantedAsProducer) { $producer = Producer::searchOne(['id' => \Yii::$app->user->identity->id_producer]); } ?>