Update User.php

This commit is contained in:
Anyon 2019-11-19 10:02:05 +08:00
parent 0d85f1f85b
commit 291bf19153

View File

@ -91,7 +91,7 @@ class User extends Controller
if ($post['password'] !== $post['repassword']) {
$this->error('两次输入的密码不一致!');
}
if (DataExtend::save($this->table, ['id' => $post['id'], 'password' => md5($post['password'])], 'id')) {
if (data_save($this->table, ['id' => $post['id'], 'password' => md5($post['password'])], 'id')) {
$this->success('密码修改成功,下次请使用新密码登录!', '');
} else {
$this->error('密码修改失败,请稍候再试!');