Hi Grant,

I should have stated the reason.  I was trying to set up an automated
way to populate my modified_by field with the logged-in user name.
Thus:

             $model->data[$model->name]['modifiedby'] =
$_SESSION['member'];

but using cake, rather than PHP.  It occurred to me that there might
be all sorts of data I might wish to pass to the behavior. It seems
rather limited in being able to receive variables from the
controller.  Maybe I've misunderstood this,  but if the Behavior
cannot receive and manipulate data very easily then there doesn't seem
much point in having the Behaviors facility.


On 21 Nov, 22:54, Grant Cox <[EMAIL PROTECTED]> wrote:
> Cake does not provide a method, as you should not be accessing the
> session from any model / behaviour.
>
> Sometimes it is just much easier to do so though, so you can still
> access $_SESSION directly.  But you really should reconsider whether
> you have to access the session in your model / behaviour - it may
> indicate an overall problem with your application structure.
>
> On Nov 21, 11:46 pm, villas <[EMAIL PROTECTED]> wrote:
>
> > Cake 1.2  -- How can I access session data from inside a 'behaviour'
> > file?  TIA
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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