diff --git a/Module.php b/Module.php index 6f29560..673d0a2 100755 --- a/Module.php +++ b/Module.php @@ -66,9 +66,6 @@ */ public function init() { - if($this->userIdentityClass === NULL) { - $this->userIdentityClass = Yii::$app->getUser()->identityClass; - } if($this->commentModelClass === NULL) { $this->commentModelClass = CommentModel::className(); } @@ -77,6 +74,8 @@ } if(\Yii::$app instanceof Application) { $this->controllerNamespace = 'artweb\artbox\comment\commands'; + } elseif($this->userIdentityClass === NULL) { + $this->userIdentityClass = Yii::$app->getUser()->identityClass; } if($this->db === NULL) { $this->db = \Yii::$app->db; -- libgit2 0.21.4