Commit 32fd32d61d046e81455578206f736e19494ca538

Authored by Administrator
1 parent 54731db6

16.03.16

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
common/models/Chat.php
... ... @@ -92,10 +92,11 @@ class Chat extends \yii\db\ActiveRecord
92 92  
93 93  
94 94 public function getInterlocutor(){
  95 +
95 96 if($this->from_user == \Yii::$app->user->id){
96 97 return UserInfo::findOne(['user_id'=>$this->to_user]);
97 98 } else {
98   - return UserInfo::findOne(['user_id'=>$this->from_user]);
  99 + return UserInfo::find(['user_id'=>$this->from_user]);
99 100 }
100 101 }
101 102  
... ...