Ah. Understand now. However I don't save it in sessions. But the above
easy to modify for my needs.

Thanks for the help!

Andreas

On Jan 18, 4:12 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Well if you you set in AppModel :
>
> static usergroup = null;
> function store($group)
> {
> self::$usergroup = $group;
>
> }
>
> function getgroup()
> {
>    return self::$usergroup;
>
> }
>
> in AppController ( suppoisng you store the group in the Session), you
> can do
>
> function beforeFilter()
> {
> if(isset($this->{$this->modelClass})         /* thank AD for this */
>       $this->{$this->modelClass}->store($this->Session-
>
> >('whereismygroup');
> }
>
> now in any model
>
> $currentgroup= $this->getgroup();
>
> Maybe you have to check values before storing etc ... but that the
> idea
>
> hth
> On Jan 18, 3:37 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > Care to elaborate the session part? Didn't get that.
>
> > On Jan 18, 2:38 pm, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > You coul declare a static variable in appModel, and update it from
> > > session in beforeFilter ... just a hint ..
> > > hth
>
> > > On Jan 18, 2:25 pm, Andreas <[EMAIL PROTECTED]> wrote:
>
> > > > Hi
>
> > > > I've been using a variable in my appcontrol that stores what group the
> > > > user belongs to based on previous acl things done in the script. The
> > > > thing is that now I need the information in one of my models for
> > > > validation. Should i store the information in appmodel instead or is
> > > > there any other good solution on this? Is it possible (and a good
> > > > idea?) to store the information in Auth?
>
> > > > Andreas
--~--~---------~--~----~------------~-------~--~----~
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