# Call to a member function login() on null

**URL:** <https://discourse.cakephp.org/t/call-to-a-member-function-login-on-null/2625>\
**Category:** Need Help\
**Created:** [May 27, 2017, 4:40am UTC](https://discourse.cakephp.org/t/call-to-a-member-function-login-on-null/2625 "2017-05-27T04:40:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehedi094030](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/mehedi094030/32/646_2.png) [@mehedi094030](https://discourse.cakephp.org/u/mehedi094030)\
**Post date:** [May 27, 2017, 4:40am UTC](https://discourse.cakephp.org/t/call-to-a-member-function-login-on-null/2625/1 "2017-05-27T04:40:21Z")

</div>

When I am using cakephp 2.0.2 login works fine with $this-\>Auth-\>login(). But when I am using cakephp 2.8.8 I got the internal error and it was Call to a member function login() on null.

Is there any new something in cakephp 2.8.8 instead of using $this-\>Auth-\>login(). Please help me

---

<div class="post-metadata">

**Author:** ![nhatdq](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@nhatdq](https://discourse.cakephp.org/u/nhatdq)\
**Post date:** [November 4, 2019, 4:16pm UTC](https://discourse.cakephp.org/t/call-to-a-member-function-login-on-null/2625/2 "2019-11-04T16:16:20Z")

</div>

me too, you done? please help me
