You're loading Cake's Auth in the $components array. If you're
extending that component you need to load 'OrgAuthorize'.

On Sun, May 13, 2012 at 5:51 PM, bs28723
<bill.sto...@boosterwebsolutions.com> wrote:
> I wrote an Auth Component. It gets a bunch of permission information about
> the current user.
> How can I pass this information back to the controller?
>
> In AppContoller.php
>     public $components = array(
>         'Auth' => array(
>             'loginRedirect' => array('controller' => 'users', 'action' =>
> 'index'),
>             'logoutRedirect' => array('controller' => 'users', 'action' =>
> 'index'),
>             'authError' => "You can't access that page",
>             'authorize' => array('Org','Controller')
>        ),
>         'Session'
>     );
>
> Everything is working, but I can't call any functions in my
>    Controller/Component/Auth/OrgAuthorize.php
>
> like...
>
>    $this->Auth->Org->check();
>
> I get
> Fatal error: Call to a member function getPerms() on a non-object
>
> How can I get this to work?  I don't want to replace the current Auth
> Component with myAuth.
>
> Thanks,
> bill
>
>
> ________________________________
> View this message in context: Can't call Auth component from controller
> Sent from the CakePHP mailing list archive at Nabble.com.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to