that sounds promising. Thanks!
On Nov 10, 4:16 pm, francky06l <[EMAIL PROTECTED]> wrote:
> you could set a static variable and method in app_model to hold/set
> the session data. You can call the method from app_controller
> beforeFilter using
> $this->{$modelClass}->setSessionData($this->Session->read('User')) for
> example... Then, in any model you could refer to
>
> self::$sessionData ...
>
> just a hint
>
> On Nov 10, 3:20 am, validkeys <[EMAIL PROTECTED]> wrote:
>
> > Hey Guys,
>
> > So I have created an activity log model "Acitivity" that tracks
> > certain events that happen in my app (Client Created, Message Posted
> > etc..)
>
> > Because there is no uniformity to the times when these activities are
> > logged I have decided not to create a behaviour (also because I haven
> > ever progged a behavour before), but instead I am placing the function
> > to create the activity log in the afterSave method for the models that
> > will be logged.
>
> > Whenever an activity is logged, I associate that record with the user
> > who performed the action. The only problem is that the user id is in
> > the session and I am using an afterSave method in the model to create
> > the activity log. How can I access the user id from the session in a
> > Model::afterSave method?
>
> > Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---