The same issue has been discussed in this thread: http://groups.google.com/group/cake-php/browse_thread/thread/728bd1da64e93897/e2f3936ae2072278?lnk=gst&q=login+email+username#e2f3936ae2072278
See how the original poster did it, you should be able to do something similar. Enjoy, John On May 31, 1:56 pm, Saurav <[email protected]> wrote: > Hi > > I am using the following code to authenticate a user: > > function beforeFilter() { > $this->Auth->fields = array('username' => 'email', > 'password' => 'password'); > > } > > Its working fine! But, I want cakephp to validate the auth with > username = 'email' OR username = 'username' > > I tried the following but its not working: > > function beforeFilter() { > $this->Auth->fields = array('username' => > array('email','username'), 'password' => 'password'); > > } > > Can anyone help me with this pls? > > Many Thanks 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
