Hi AD,

Thanks for your reply
I'm not overwriting the array/configuration,I found the problem in
core file (I think its a bug and need to fix it).
It is in
/lib/Cake/Controller/Component/Auth/FormAuthenticate.php on line 61,62
and 67,68

Thanks
Vaibhav

> > number 61,61 and 67,68
On Jan 9, 2:04 pm, AD7six <[email protected]> wrote:
> On Jan 9, 9:53 am, "vaibhav.malushte" <[email protected]>
> wrote:
>
> > Hi,
>
> > After spending 2 days, finally I've found why it was not working.
>
> > In /lib/Cake/Controller/Component/Auth/FormAuthenticate.php on line
> > number 61,61 and 67,68 it is trying to access the undifined
> > "$fields['username'] and "$fields['password']  index
> > it should be only ['username'] and ['password'].
>
> Those keys are always set (See BaseAuthenticate settings property)  -
> That means you've somehow managed to configure the auth component to
> effectively unset them.
>
>
>
> > Just replace
> >      empty($request->data[$model][$fields['username']]) ||
> > empty($request->data[$model][$fields['password']])
> > With
> >      empty($request->data[$model][['username']) || 
> > empty($request->data[$model]['password'])
>
> > and you are done
>
> You mean edit the core files? Don't. Do. That.
>
> Either it's a bug and it needs fixing, or there's an error in your
> code. Given there are tests covering this core component's usage, it's
> quite likely the latter.
>
> It's hard to read your code; but if you were able to find the error -
> I trust you're also able to find where you're overwriting the settings
> array to remove the keys the code relies upon to work.
>
> AD

-- 
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

Reply via email to