Php 将Wordpress密码传输到Laravel

Php 将Wordpress密码传输到Laravel,php,wordpress,laravel,laravel-5.2,Php,Wordpress,Laravel,Laravel 5.2,我正在尝试将用户从Wordpress导入Laravel,但我无法正确获取密码。当用户登录时,我需要根据md5检查密码,如果正确,则在bcrypt中对其进行散列 我在AuthenticatesUsers.php login()中尝试过这个 我也尝试过,但无法使其验证md5密码。用于拥有/检查您的密码: $password = 'plain-text-password'; $wp_hashed_password = '$P$B7TRc6vrwCfjgKLZLgmN.dmPo6msZR.'; if

我正在尝试将用户从Wordpress导入Laravel,但我无法正确获取密码。当用户登录时,我需要根据md5检查密码,如果正确,则在bcrypt中对其进行散列

我在AuthenticatesUsers.php login()中尝试过这个

我也尝试过,但无法使其验证md5密码。

用于拥有/检查您的密码:

$password = 'plain-text-password';

$wp_hashed_password = '$P$B7TRc6vrwCfjgKLZLgmN.dmPo6msZR.';

if ( WpPassword::check($password, $wp_hashed_password) ) {
    // Password success!
} else {
    // Password failed :(
}
用于拥有/检查您的密码:

$password = 'plain-text-password';

$wp_hashed_password = '$P$B7TRc6vrwCfjgKLZLgmN.dmPo6msZR.';

if ( WpPassword::check($password, $wp_hashed_password) ) {
    // Password success!
} else {
    // Password failed :(
}

$user=user::where(…
它找到用户了吗?是的,它找到了用户,但它无法验证md5密码。如果它找到了用户,md5密码已经被验证,我想你不能做的是在将密码散列到bcrypt后对用户进行身份验证…问题可能在
如果(Auth::guard($this->getGuard())->trunt($credentials,$request->has('memory'))
可能我误解了你的意思。它通过电子邮件找到用户,但不会运行括号内的代码,因为它不会验证密码。md5()是否为$P$密码工作?你确定密码是md5散列的吗?这看起来根本不像md5:在
$user=user::where中发生了什么(…
它找到用户了吗?是的,它找到了用户,但是它不能验证md5密码。如果它找到了用户,md5密码已经被验证了,你不能做的是在将密码散列到bcrypt后验证你的用户,我想…问题可能出在
如果(Auth::guard($this->getGuard())->尝试($credentials,$request->has('memory'))
也许我误解了你。它通过电子邮件找到用户,但不会运行括号内的代码,因为它不会验证密码。md5()是否适用于$P$密码?你确定密码是md5哈希的吗?这看起来根本不像md5: