Answer the question
In order to leave comments, you need to log in
Why doesn't findOne by id work?
Function:
public function editdata()
{
$user = User::findOne($this->id);
$user->username = $this->username;
$user->email = $this->email;
$user->fio = $this->fio;
$user->apartment = $this->apartment;
$user->house = $this->house;
$user->housing = $this->housing;
$user->street = $this->street;
$user->phone = $this->phone;
$user->setPassword($this->password);
return $user->save() ? $user : null;
}
Getting unknown property: app\models\EditdataForm::id
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question