Hello,
I’m currently trying to update my app from yii1 to yii2, and I have a problem with the login. My passwords in yii1 are hashed and salted with ‘$2y$13$’. How can I validate my passwords on login?
public function validatePassword($password)
{
if (Yii::$app->getSecurity()->validatePassword($password, '$2y$13$')) {
return true;
} else {
return false;
}
}
This is wrong, “Hash is invalid.”, but I didn’t find any example how do do it, can anybody help, please?
Thanks!