After extending the plugin like describe in the doc: https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md
If I go to register new users I obtain an error: Call to undefined method Cake\ORM\Entity::updateToken()
it appears on the behaviors when i debug entity (debug($user);), I get: something like:
object(Cake\ORM\Entity) {
‘username’ => ‘admin’,
‘email’ => ‘admin@admin.com’,
‘password’ => ‘admin’,
‘password_confirm’ => ‘admin’,
‘first_name’ => ‘admin’,
‘last_name’ => ‘admin’,
‘tos’ => ‘0’,
‘role’ => ‘user’,
‘validated’ => false,
‘active’ => false,
‘[new]’ => true,
‘[accessible]’ => [
‘*’ => true
],
‘[dirty]’ => [
‘username’ => true,
‘email’ => true,
‘password’ => true,
‘password_confirm’ => true,
‘first_name’ => true,
‘last_name’ => true,
‘tos’ => true,
‘role’ => true,
‘validated’ => true,
‘active’ => true
],
‘[original]’ => [],
‘[virtual]’ => [],
‘[hasErrors]’ => false,
‘[errors]’ => [],
‘[invalid]’ => [],
‘[repository]’ => ‘IcUsers’
}
the same debug without extending the plugin I get:
object(CakeDC\Users\Model\Entity\User) {
‘username’ => ‘admin’,
‘email’ => ‘admin@admin.com’,
‘password’ => ‘$2y$10$EqOyuxh/Ck6WHR7k6TGBg.igjeuUQDGJR7LFaXfszl.OkyhScUhC6’,
‘password_confirm’ => ‘admin’,
‘first_name’ => ‘admin’,
‘last_name’ => ‘admin’,
‘tos_date’ => object(Cake\I18n\Time) {
'time' => '2019-06-22T23:42:24+00:00',
'timezone' => 'UTC',
'fixedNowTime' => false
},
'tos' => '1',
'role' => 'user',
'validated' => false,
'active' => false,
'[new]' => true,
'[accessible]' => [
'*' => true,
'id' => false,
'is_superuser' => false,
'role' => false
],
'[dirty]' => [
'username' => true,
'email' => true,
'password' => true,
'password_confirm' => true,
'first_name' => true,
'last_name' => true,
'tos' => true,
'tos_date' => true,
'role' => true,
'validated' => true,
'active' => true
],
'[original]' => [],
'[virtual]' => [],
'[hasErrors]' => false,
'[errors]' => [],
'[invalid]' => [],
'[repository]' => 'CakeDC/Users.Users'
}
It seems the behavior are not linked to the users entity after extending it, but dont know how to correct this.
Thansk for your help.