You could use two tables for login: users and groups

In groups you define ... well... the groups: Staff Members, Caregiver etc

Then you link your users to groups via group_id.

Based on the group they belong to, you can decide which layout to load.


On Tue, May 18, 2010 at 8:28 PM, pomares <[email protected]>wrote:

> Hi, everyone!
>
> I have families that have many caregivers and many clients. Each
> client and each caregiver belong to one family. I also have
> staff_members.
>
> In the simplest form of the authentication system I want to create,
> staff would login against the StaffMember model and get routed to one
> place, caregivers would login against the Caregiver model and get
> routed to another. Each "place" would have its own layout and
> functionalities.
>
> The difficulty lies, as I see it, with the built-in Auth component
> only being able to use one table to authenticate against. Can I use
> more than one table?
>
> Or,
>
> I could combine staff_members with caregivers into one caregivers
> table, and identify them at login time by assigning them separate
> roles. But how would I be able to use different views depending on the
> role of the loggedIn user?
>
> 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]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

Reply via email to