I think typically the better implementation would be to use the same model
and use ACL to determine permissions.  This is pretty complicated though.

Too accomplish what you are talking about you can use the userModel variable
from the Auth component:
http://book.cakephp.org/view/248/AuthComponent-Variables

You would set it in the beforeFilter of the controller which you want to use
that model. ie.

users_controller.php
beforeFilter() {
   $this->Auth->userModel = 'User';
}

clients_controller.php
beforeFilter() {
   $this->Auth->userModel = 'Client';
}

On Fri, Nov 20, 2009 at 9:38 AM, K3 <kiril.zvezdako...@gmail.com> wrote:

> Hi,
> i have users model (for content management administrators) and clients
> model (for registered clients).
>
> Can i use the same Auth compoennt for both models (to allow them to
> login/register)? or i need different approach?
> Any examples/help?
>
> thanks.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-...@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/cake-php?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.


Reply via email to