I haven't tested this, but...
Auth->user() is really just a call to Session->read(), which is Model-
>read() which is actually Model->find('first') in 1.2.7692.
So in theory, adding var $recursive = 2; to the User class definition
might do the trick without having to write a wrapper component for
Auth.
On Jul 3, 9:15 am, marikka <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I have a User model which hasOne Role model.
>
> When using $this->Auth->user() I get the User model find, but I'd need
> to get the related Role model as well. Is it possible somehow?
>
> First thing that comes to my mind is to extend AuthComponent and write
> my own method that returns the User model WITH associated models. Is
> this the way to go?
>
> Thanks in advance!
>
> -M
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---