Exemplo n.º 1
0
 public function init()
 {
     parent::init();
     if ($user = Yii::$app->getUser()) {
         $this->auth_user = $user->identity;
     }
 }
 public function behaviors()
 {
     parent::behaviors();
     return ['verbs' => ['class' => VerbFilter::className(), 'actions' => ['uploadphoto' => ['post'], 'deletetempfile' => ['post'], 'remove' => ['post']]], 'access' => ['class' => \yii\filters\AccessControl::className(), 'rules' => [['actions' => ['index', 'uploadphoto', 'deletetempfile', 'manage', 'save', 'remove', 'move', 'update'], 'allow' => true, 'roles' => ['@']]]]];
 }