(solved) Hidden field is exposed

@Trader5050
Sun, 01 Sep 2024 13:23:55 +0000

I have a User entity that’s exposing the password field even when set to hidden:

class User extends Entity implements IdentityInterface
{

protected array $_accessible = [
    'email' => true,
    'picture' => true
];

protected array $_hidden = ['password'];

The call to grab the user is:

$user = $this->Users->findById($this->request->getSession()->read(‘identity.user.id’), contain: [‘Roles’])->first();

That’s it. No idea why it’s being exposed.