> Eventually solved it:
>
> In my app_controller:
>
> function levelcheck()
>         {
>                 $level_check = $this->othAuth->group('level');
>                 if (!empty($level_check))
>                 {
>                         $level = $level_check;
>                 } else {
>                         $level = 0;
>                 }
>                 return $level;
>         }
>
> Then I can call $this->levelcheck() when I need the users level.

will you not likely need to know the level for most functions? if so,
would it not be best to follow the previous advice and put this in
beforeFilter() in your app_controller, then you will never need to
call levelCheck explicity, it will be done for you automatically.

if you're using othAuth, you'll already have some code in
beforeFilter, so just add the above to that...

jb

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~---------~--~----~------------~-------~--~----~
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