You shuldn't try to access session information from within a model, instead
try passing it from  the controller as a parameter. Example:

Model User:

function getUserInfo($user_id){
...
}

Controller:

User->getUserInfo($this->Session->read("logged_user_id"));

Regards,

-- 
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net


On Jan 9, 2008 4:31 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

>
> I have a model function that is dependent on data retrieved from the
> session and I can't figure out how to retrieve it. Using $this-
> >Session->read('User') results in: Undefined property:  User::
> $Session.
>
> Anyone know?
> >
>


-- 
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to