Beispiel #1
0
    /**
     * Finds user by [[username]]
     *
     * @return User|null
     */
    protected function getUser()
    {
        if ($this->_user === null) {
            $this->_user = Users::findByUsername($this->username);
        }

        return $this->_user;
    }
 private function findUser($model,$attribute){
     $this->user =  Users::findByUsername($model->$attribute , false);
     return $this->user;
 }