Commit 88ddb501 by 杨树贤

修改密码接口

parent 5619d8c8
Showing with 2 additions and 0 deletions
...@@ -104,6 +104,8 @@ class UserService ...@@ -104,6 +104,8 @@ class UserService
//修改密码 //修改密码
public static function changePassword($ucId, $password) public static function changePassword($ucId, $password)
{ {
$salt = UserModel::where('uc_id', $ucId)->value('salt');
$password = PasswordService::passwordHash($password, $salt);
return UserModel::where('uc_id', $ucId)->update([ return UserModel::where('uc_id', $ucId)->update([
'password' => $password, 'password' => $password,
'update_time' => time(), 'update_time' => time(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment