The pro solution of this problem is ACL.. se this in cookbook and here: http://www.mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1
On 7 Sie, 17:42, "Mariano C." <[email protected]> wrote: > Nothing change... > > On 7 Ago, 17:34, cricket <[email protected]> wrote: > > > > > > > > > On Sat, Aug 7, 2010 at 11:19 AM, Mariano C. <[email protected]> > > wrote: > > > I have: > > > class AppController extends Controller { > > > var $components = array('Auth'); > > > > function beforeFilter() { > > > $this->Auth->allow(array('users' => 'register')); > > > > if ($this->Auth->user('User.role') == 0) > > > { > > > $this->Auth->deny('*'); > > > $this->Auth->allow(array('books' => 'index')); > > > } > > > else > > > { > > > $this->Auth->deny('*'); > > > } > > > } > > > } > > > I believe it should be $this->Auth->user('role') Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
