From 6399b1691b9aecf1241c900b80e34ed685ca51f9 Mon Sep 17 00:00:00 2001 From: Andrey Girnik Date: Sat, 17 Apr 2021 23:00:11 +0700 Subject: [PATCH] Bug fix with calling to a function validateCsrfToken() on string --- README.md | 2 +- changelog.md | 3 +++ src/controllers/BaseController.php | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c9b2adb..5e33e64 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Via composer: -`composer require itstructure/yii2-rbac-module "~3.0.3"` +`composer require itstructure/yii2-rbac-module "~3.0.4"` ### If you are testing this package from local server directory diff --git a/changelog.md b/changelog.md index 10b598d..d14b052 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ ### CHANGE LOG: +**3.0.4 April 17, 2021:** +- Bug fix: **Call to a member function validateCsrfToken() on string**. + **3.0.3 February 23, 2021:** - Upgrade copyright year. diff --git a/src/controllers/BaseController.php b/src/controllers/BaseController.php index e9d3343..a3050b9 100644 --- a/src/controllers/BaseController.php +++ b/src/controllers/BaseController.php @@ -133,6 +133,8 @@ public function behaviors() */ public function init() { + parent::init(); + $this->view->params['user'] = Yii::$app->user->identity; }