我正在使用带有身份验证组件的 cakephp 3.7.2
$user = $this->Authentication->getIdentity();
印刷:
object(Authentication\Identity) {
'config' => [
'fieldMap' => [
'id' => 'id'
]
],
'data' => object(App\Model\Entity\User) {
'id' => (int) 1,
'email' => 'aa.aaa@gmail.com',
...
}
}
我已经尝试过$user->data
,但它不起作用。
如何打印用户数据?