Atuth->identify returning false(Cakephp 3.6.9 )
Atuth->identify returning false(Cakephp 3.6.9 )
It looks like _query function that is called inside _findUser function only returning EntityUser Object without any data.Due to this it not able to use fetched password and it is not matching.
For debugging done some changes i.e. in
src/Auth/BaseAuthenticate.php -> _findUser function's
Following line
$result = $this->_query($username)->first();
Changed to
$result=$this->_query($username);
debug("Output is.".print_r($result->first(),true));
$result=$result->first();
In debug log following User Object entity object printed (i.e only in case of username exist in database.It shows undefined variable;When username not exists in database).
Debug log is
AppModelEntityUser Object
(
[[new]] => 1
[[accessible]] => Array
(
[*] => 1
)
[[dirty]] => Array
(
)
[[original]] => Array
(
)
[[virtual]] => Array
(
)
[[errors]] => Array
(
)
[[invalid]] => Array
(
)
[[repository]] =>
)
Any suggestion to solve this problem will be helpful.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.