protected function findModelUser($id)
 {
     $model = User::findOne($id);
     if ($model->user_type == 2) {
         return $userModel = UserDlt::findOne($id);
     } elseif ($model->user_type == 3) {
         return $userModel = Usercustoms::findOne($id);
     } elseif ($model->user_type == 5) {
         return $userModel = UserTourcompany::findOne($id);
     }
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUsercustoms()
 {
     return $this->hasMany(Usercustoms::className(), ['user_id' => 'id']);
 }