添加校验支付密码功能
This commit is contained in:
parent
76b998a6c9
commit
fc5ca42b6a
@ -643,9 +643,12 @@ class UserLogic extends Logic
|
||||
public static function checkPayPassword($post, $user_id)
|
||||
{
|
||||
$user = User::where(['id' => $user_id, 'del' => 0])->find();
|
||||
$password = create_pay_password($post['pay_password'], $user['salt']);
|
||||
if($password != $user['password']) {
|
||||
return '密码错误';
|
||||
$pay_password = create_pay_password($post['pay_password'], $user['salt']);
|
||||
|
||||
if ($pay_password === $user['pay_password']) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user