dongpu9481 2017-08-01 23:34
浏览 61
已采纳

重置密码CakePHP 2.X BlowfishPasswordHasher

I am encrypting my password with BlowfishPasswordHasher in Cakephp 2.X . I don't remember the password, but I can access the database. How can replace the password with by default password like "123"? Without creating an application that does that.

  • 写回答

1条回答 默认 最新

  • douzhun5971 2017-08-02 02:10
    关注

    Try this from any function within controller:

    $password = "123";
    $hash = Security::hash($password, 'blowfish');
    debug($hash);die();
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?