<input type="button" value="нажми суко кнопку" onclick="alert(1)">findOne()  ищет по первичному ключу, по id. поэтому и не находит$user = User::find()->where(['username'=>$this->username])->one()public function editdata()
    {
if($user = User::find()->where(['username'=>$this->username])->one()){
        if($this->email != null)$user->email = $this->email;
        if($this->fio != null)$user->fio = $this->fio;
        if($this->apartment != null)$user->apartment = $this->apartment;
        if($this->house != null)$user->house = $this->house;
        if($this->housing != null)$user->housing = $this->housing;
        if($this->street != null)$user->street = $this->street;
        if($this->phone != null)$user->phone = $this->phone;
        if($this->password != null)$user->setPassword($this->password);
        return $user->save();
}
return false;
    }'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
                  '/'=>'site/index',
                  '/film/category/list/<slug>'=>'film/category/list',
                  ' /film/category/list'=>'film/category/all',public function rules()
    {
        return [
            ['items'], 'checkItem'
        ];
    }public function rules()
    {
        return [
            [['items'], 'checkItem']
        ];
    }foreach ($this->items as $item) {
                $item = new Item;