예제 #1
0
 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);
     }
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUsercustoms()
 {
     return $this->hasMany(Usercustoms::className(), ['user_id' => 'id']);
 }