I have already try this possibility. Of course, I thought it will work
like you but it doesn't.
I read the original Auth component and it can't work because it
considers only the userModel for the two fields even if you define
your fields like you made it, with two different models.
So I wrote an adapted Auth component to take in account two different
models. My component allows me now to have two different models for
the username and the password.
I'm newbie with cakePHP, so I think my adapted component is not
perfect. Maybe it could be interesting to propose this improvement to
cakePHP team.
On Sep 4, 4:50 am, Penfold <[EMAIL PROTECTED]> wrote:
> This is how to change from the default.
>
> $this->Auth->fields = array('username' => 'email', 'password' =>
> 'passwd');
>
> It might work if you added the model
>
> $this->Auth->fields = array('username' => 'email.email1', 'password'
> => 'user.passwd');
>
> On 3 Sep, 23:37, jbarbede <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I try to use the Auth component to authentificate users but It seems
> > I can't have a username and a password in two different models.
>
> > I explain the situation in details: a user can connect to the Web
> > site with his email and his password. But my application allows a user
> > to have several emails whose one primary to connect to the Web site.
> > So I manage a model for users and a model for emails.
>
> > Someone who already solved this problem? Or the unique solution
> > consists to modify the Auth component to integrate this particularity?
>
> > Thanks
>
> > Julien
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---