On Aug 24, 2011, at 07:59, Mohd Hasnol wrote: > Let me explain. i have 2 roles which are admin and members.it can be many > admin and members. For admin i can add new admin using add function in users > controller and using users table. For member i would like using add function > in members controller and members table since members have many > attributes(username, password,name,etc..) compare to users table(only > username and password). > > Then, the login function need username and password in users table. How could > i use username and password in members table to login? > > In this situation, admin will set the username and password for the member. > But then member can change it after they login.
Put *all* users -- whether admins or members -- into a single "users" table. You could add a "role" field to it to distinguish admins from members. It probably doesn't matter if the admins have extra fields in the table that don't get filled in. -- 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 [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
