Commit 395a7b372fce97655381ea3cbeaa727a07a23886

Authored by Yarik
1 parent 226062a5

Module fix

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