I am using cakephp 3 installed on xampp. It was running fine. but now I got the error after login.
database table relation:
users
hasMany roles
roles
hasMany users
relational table:roles_users
AppController.php
$this->loadComponent('TinyAuth.Auth', [
'loginAction' => [
'controller' => 'Users',
'action' => 'login'
],
'loginRedirect' => [
'controller' => 'Users',
'action' => 'dashboard'
],
'authError' => 'Did you really think you are allowed to see that?',
'authenticate' => [
'Form' => [
'fields' => [
'username' => 'username',
'password' => 'password'
],
// 'scope' => ['Users.active' => true],
'contain' => ['Roles']
]
],
]
);
I got the following error in error.log file
2017-02-02 01:04:08 Error: [Cake\Core\Exception\Exception] Missing TinyAuth role id field (Auth.User.role_id) in user session
roles_users
? – tarikul05