I dont see status and role of uers

Good Evening!

I started to working with CakePHP and I have got a little issue.
When I’m adding user into database i have 2 things like ‘status’ (active - 1 / inactive - 0) and 'role (user - 0 / admin - 1).

In database (SQL) I see values like 0 in users, but when i’m looking into ‘index’ of users I dont see values ‘0’. For example i will give to user role = admin and I will see value ‘1’ in ‘ROLE’, but when i’m gonna change it into ‘0’, that value dissappear. But in database I see value ‘0’.

Could someone help me with it?

Index of Users (ROLE)

<?= h($user->role) ?>

Are you using tinyint and just make sure a 1or 0 is stored and not a null. Remember if you are using a checkbox that is not checked nothing passes therefore you have to manually check if nothing was passed and if not assign it yourself in code.