修复学生修改密码错误
This commit is contained in:
1 parent
377f1914d1
commit
ffdda769e2
1 file changed
+2
-2
@@ -108,7 +108,7 @@ class Index extends StudentSearchBase
|
||||
|
||||
// 获取用户名
|
||||
$stu = new \app\student\model\Student;
|
||||
$serpassword = $stu::where('id', $id)->value('password');
|
||||
$serpassword = $stu::where('id', $student_id)->value('password');
|
||||
|
||||
// 实例化加密类
|
||||
$md5 = new APR1_MD5();
|
||||
@@ -123,7 +123,7 @@ class Index extends StudentSearchBase
|
||||
|
||||
// 更新密码
|
||||
$password = $md5->hash($list['newpassword']);
|
||||
$data = $stu::update(['id' => $id, 'password' => $password]);
|
||||
$data = $stu::update(['id' => $student_id, 'password' => $password]);
|
||||
|
||||
// 根据更新结果设置返回提示信息
|
||||
$data ? $data = ['msg' => '修改成功', 'val' => 1]
|
||||
|
||||
Reference in new issue
Block a user