Actually, can I use the $session helper in a controller? Is it supposed to be Session ?
Thanks again! On Mar 21, 9:12 pm, mscdex <[email protected]> wrote: > On Mar 21, 9:11 pm, cpeele <[email protected]> wrote: > > > Thanks for the help guys. I appreciate it. The reason I need to do > > this is I need to associate a submitted item (in this case a project) > > with the logged in user. Is there another way to do this then? > > One solution would be to remove the hidden form field and instead > append a new array containing the user_id to $this->data right before > you call saveAll: > > $this->data += array('User' => array('user_id' => $session->read > ('User.user_id'))); > $this->Project->saveAll($this->data); --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
