I want to extend users plugin so that i can remove username field and customize my table according to needs. I have seen the github documentation for extending plugin but that doesn't help me much. I tried to extend UserTable.php but it gives me error Unknown method "register". Please suggest best way or simple code.
Check this cloud9 environment created specifically to show how to extend the model and table as an example: https://ide.c9.io/steinkel/users-example-custom-table
Basically changes done to use a custom table are:
Set your table in configuration key 'Users.table' like we did in 'config/users.php'
$config = [
'Users' => [
//Table used to manage users
'table' => 'MyUsers',
]
];
return $config;
And you are done :)