Login [ Auth->identify() ] always false on CakePHP 3

前端 未结 5 2408
孤街浪徒
孤街浪徒 2020-12-10 05:18

I started using CakePHP 3 after a time using CakePHP 2 and I am having troubles to create the authentication login.

The new auth function $this->Auth->id

5条回答
  •  难免孤独
    2020-12-10 05:29

    I came out with a solution just by adding use Cake\Auth\DefaultPasswordHasher; and its following override method _setPassword.

    Here is the change:

    Model/table.php

    hash($password);
    }
    

提交回复
热议问题