/** * Finds user by [[username]] * * @return User|null */ public function getUser() { if ($this->_user === false) { $this->_user = Users::findByUsernameAndPassport($this->username, $this->passport); } return $this->_user; }