I have a user model that belongs to Role, therefore the role field, in $this->Auth->user('role')
is an associative array of the associated role table fields. I assume that this is a relatively common situation, and I'm assuming that there is a better way to access the 'role'
field of my Role
model through the Auth component without having to assign $this->Auth->user('role')
to a different variable.
Am I correct in this, or am I up in the night?
I ask, because I would like to use it in a conditional, and I'm thinking there must be a way to not have to assign it to another variable first, and I don't understand it.