I am giving the role of an administrator to a user & trying to access the user object in which Admin(column name) always shows 0 (Zero) instead of 1.
Thanks in advance!
That isn't a role.
That is the super admin, it has permission to do anything use it sparingly.
grep is your friend.
Thanks, @x00 for your valuable answer.
But I also want to know how to differentiate between a moderator & an administrator user? Is there any flag or db column exist?
I have to check & do some special actions on the basis of admin, moderator which I can get in the user object.
You should never use the database directly to check that. Relational databases can be complex and relationships are not full described without models.
You can find in in the dashboard under users or you will use the usermodel which already maps the relationships.