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." <mariano.calan...@gmail.com> wrote: > Nothing change... > > On 7 Ago, 17:34, cricket <zijn.digi...@gmail.com> wrote: > > > > > > > > > On Sat, Aug 7, 2010 at 11:19 AM, Mariano C. <mariano.calan...@gmail.com> > > 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 cake-php@googlegroups.com 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?hl=en