示例#1
0
 /**
  * Finds user by [[username]]
  *
  * @return User|null
  */
 public function getUser()
 {
     if ($this->_user === false) {
         $this->_user = Operator::findByUsername($this->username);
     }
     return $this->_user;
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getOperator()
 {
     return $this->hasOne(\app\models\plrs\Operator::className(), ['id' => 'operator_id']);
 }