コード例 #1
0
 /**
  * Finds user by [[username]]
  *
  * @return User|null
  */
 public function getUser()
 {
     if ($this->_user === false) {
         $this->_user = User::findByUsername($this->username);
     }
     return $this->_user;
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdUserUpdated()
 {
     return $this->hasOne(User::className(), ['id' => 'id_user_updated']);
 }