You can try to determine username/email condition in your login action
and set appropriate $this->Auth->fields['username'] value before
actual login.

On Jun 4, 11:54 am, lakers fan <lakersfa...@msn.com> wrote:
> Hello,
>
>      I have a login screen with username and password. I want to either use 
> my username or email address in the username field. I tried setting the Auth 
> fields as listed below but its not working.
>
> $this->Auth->fields = array('username'=>array('username', 
> 'email_address'),'password'=>'password');
>
> The warning that i get is:
>
> Warning (2): Illegal offset type in isset or empty 
> [CORE\cake\libs\controller\components\auth.php, line 845]
>
> Code | ContextWarning (2): Illegal offset type in isset or empty 
> [CORE\cake\libs\controller\components\auth.php, line 313]
>
> Is there any other way of doing this??
>
> Thanks,
>
> Bharani
>
> _________________________________________________________________
> Windows Live™ SkyDrive™: Get 25 GB of free online 
> storage.http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to