Use users plugin. Create an agent table with the additional attribute and user_id to reference the user. Make /users/register visible to admin only. After successful new user registration if the user role is agent, redirect to /admin/agent/add. If you choose to implement role based access you can check the user role in login function and redirect the user with the right prefix.
On Thu, Aug 18, 2011 at 4:22 AM, Mohd Hasnol <hasnolm...@gmail.com> wrote: > Thanks.But how the agent would like to login since admin and agents use > same login page. i use users table for login function. how i can link agent > table to the login function? for my case,at first, admin will decide agents > username and password. Then,admin will give it to the agents and they could > change their password. > > Thanks. > > On Wed, Aug 17, 2011 at 5:21 PM, WebbedIT <p...@webbedit.co.uk> wrote: > >> ACL has little to do with this as your simply talking about which >> model to use when creating an Agent, which has more field than a >> standard User. >> >> There is no right answer and you have a choice of using either /users/ >> agentAdd(agentEdit) or /agents/add(edit). >> >> I personally prefer to keep my add and edit actions within their >> respective controllers so would use the Agent model and include the >> required User fields in the form. As long as you use $this->Agent- >> >saveAll(); cake will deal with associating the two records for you. >> >> HTH, Paul. >> >> On Aug 16, 5:28 am, Mohd Hasnol <hasnolm...@gmail.com> wrote: >> > FYI, Im using ACL for this case. >> > >> > >> > >> > >> > >> > >> > >> > On Tue, Aug 16, 2011 at 12:26 PM, nOLL <hasnolm...@gmail.com> wrote: >> > > Hi, >> > >> > > Let say, I'm admin and i would like to add agents but i would like to >> > > use different model (not users model). For example, agents model. the >> > > reason i use different model because there is other attributes i would >> > > like to fill in rather than username and password in users model. What >> > > is the best solution for this? >> > >> > > Thanks. >> > > nOLL >> > >> > > -- >> > > Our newest site for the community: CakePHP Video Tutorials >> > >http://tv.cakephp.org >> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help >> > > others with their CakePHP related questions. >> > >> > > To unsubscribe from this group, send email to >> > > cake-php+unsubscr...@googlegroups.com For more options, visit this >> group >> > > athttp://groups.google.com/group/cake-php >> >> -- >> 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 >> cake-php+unsubscr...@googlegroups.com For more options, visit this group >> at http://groups.google.com/group/cake-php >> > > -- > 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 > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php