Hi all,
Now that I have placed a function in my model rather than in my
controller to avoid requestAction I have a new problem:
The function gets data from my session.
In the controller the following works:
$user = $this->Session->read('User');
When I place this code in my model method I get the error message:
Undefined variable: Session [APP\models\text.php, line 95]
So I tried to avoid this by using the function like that:
App::import('Model', 'Session');
$Session = new Session()
$user = $Session->read('User');
This causes:
Fatal error: Class 'Session' not found in...
Questions: Is it possible to use Session data in my model? If yes which
syntax is correct?
Thanks in advance!
Anja
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---