[英]Generate password hashes for user registration on Kohana
I can't register new users, or modify user passwords, on our Kohana built website app. 我无法在Kohana内置的网站应用中注册新用户或修改用户密码。 I do have access to our database and can change passwords there but I need a way to generate password hashes from strings which will be accepted by the system. 我确实可以访问我们的数据库,并且可以在那里更改密码,但是我需要一种方法来从系统会接受的字符串中生成密码哈希。
How can I use hash_password(passwordstring, FALSE)
to display the hash I should insert into the DB? 如何使用hash_password(passwordstring, FALSE)
显示应插入数据库的哈希?
Is there anything in the modules/auth/classes/kohana/auth.php file that I should be looking at? 我应该查看modules / auth / classes / kohana / auth.php文件中的任何内容吗?
Use echo Auth::instance()->hash_password('new password')
. 使用echo Auth::instance()->hash_password('new password')
You dont need pass $salt
value because it will be generated automatically. 您不需要传递$salt
值,因为它将自动生成。
Kohana is just a framework, its not a user system. Kohana只是一个框架,而不是用户系统。 You will need to provide the code for the hash_password function as this looks like a library of some sort. 您将需要为hash_password函数提供代码,因为它看起来像某种类型的库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.