Commit 395a7b372fce97655381ea3cbeaa727a07a23886
1 parent
226062a5
Module fix
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
Module.php
| ... | ... | @@ -66,9 +66,6 @@ |
| 66 | 66 | */ |
| 67 | 67 | public function init() |
| 68 | 68 | { |
| 69 | - if($this->userIdentityClass === NULL) { | |
| 70 | - $this->userIdentityClass = Yii::$app->getUser()->identityClass; | |
| 71 | - } | |
| 72 | 69 | if($this->commentModelClass === NULL) { |
| 73 | 70 | $this->commentModelClass = CommentModel::className(); |
| 74 | 71 | } |
| ... | ... | @@ -77,6 +74,8 @@ |
| 77 | 74 | } |
| 78 | 75 | if(\Yii::$app instanceof Application) { |
| 79 | 76 | $this->controllerNamespace = 'artweb\artbox\comment\commands'; |
| 77 | + } elseif($this->userIdentityClass === NULL) { | |
| 78 | + $this->userIdentityClass = Yii::$app->getUser()->identityClass; | |
| 80 | 79 | } |
| 81 | 80 | if($this->db === NULL) { |
| 82 | 81 | $this->db = \Yii::$app->db; | ... | ... |