|
|
|
@ -54,11 +54,9 @@ class SafeController extends BaseController{
|
|
|
|
|
$this->checkPaswwordFormat($confirmpassword);
|
|
|
|
|
$data['second_pwd'] = $this->think_ucenter_md5($confirmpassword, UC_AUTH_KEY);
|
|
|
|
|
$id = get_pid();
|
|
|
|
|
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
|
if($updateRs) {
|
|
|
|
|
recordPromoteLogs('安全管理','设置安全密码');
|
|
|
|
|
$this->success("安全密码设置成功");
|
|
|
|
|
}
|
|
|
|
|
M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
|
recordPromoteLogs('安全管理','设置安全密码');
|
|
|
|
|
$this->success("安全密码设置成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function think_ucenter_md5($str, $key = 'ThinkUCenter')
|
|
|
|
@ -99,6 +97,7 @@ class SafeController extends BaseController{
|
|
|
|
|
// if(empty($oldpwd)) {
|
|
|
|
|
// $this->error("旧密码不能为空");
|
|
|
|
|
// }
|
|
|
|
|
$this->checkPaswwordFormat($safepwd);
|
|
|
|
|
if(empty($safepwd)) {
|
|
|
|
|
$this->error("安全密码不能为空");
|
|
|
|
|
}
|
|
|
|
@ -107,12 +106,8 @@ class SafeController extends BaseController{
|
|
|
|
|
}
|
|
|
|
|
$id = get_pid();
|
|
|
|
|
$data['second_pwd'] = $this->think_ucenter_md5($safepwd, UC_AUTH_KEY);
|
|
|
|
|
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
|
if($updateRs) {
|
|
|
|
|
$this->success("修改成功");
|
|
|
|
|
}else {
|
|
|
|
|
$this->error("修改失败,请重新操作");
|
|
|
|
|
}
|
|
|
|
|
M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
|
$this->success("修改成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->display();
|
|
|
|
|