User Registration with custom Class


Please assist I am trying to implement registration page from the app I built from the udemy course but I am getting:

Warning: Declaration of atk4\login\RegisterForm::setModel(atk4\data\Model $user) should be compatible with atk4\ui\Form::setModel(atk4\data\Model $model, $fields = NULL)

in Register.php i tried

$app->add(new \atk4\login\RegisterForm())
    ->setModel(new Model\User($app->db));

in Users.php I have:

namespace Model;

class User extends \atk4\data\Model

 public $table = 'User';

 function init() {

     ['name', 'required'=>true],
     ['is_admin', 'type' => 'boolean'],
     ['is_confirmed', 'type' => 'boolean']

   $ref = $this->hasMany('Friends', new Friend() );
   $ref->addField('total_loan', ['aggregate'=>'sum', 'type'=>'money']);


I havent fully grasps all the concepts as I am a newbie(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged)