Merge pull request 'hotfix/cz_auth_bug' (#323) from hotfix/cz_auth_bug into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/323
master
廖金灵 4 years ago
commit 4824b34681

@ -572,7 +572,7 @@ class AuthManagerController extends AdminController{
$promoteData = '';
}
if ($AuthGroup->where("id = {$gid}")->syncSave(array(
if ($AuthGroup->where("id = {$gid}")->save(array(
'data_empower_type' => $data_empower_type,
'data_president' => $promoteData,
'show_data' => $show_data,

@ -293,7 +293,7 @@ class UserController extends AdminController
$moblieUser = SM('UcenterMember', 'sys_')->field('id')->where(['mobile' => $_POST['mobile']])->find();
if (!empty($moblieUser)) {
if (!empty($moblieUser)&&$_POST['mobile']) {
$this->error('手机号码已存在!');
}

@ -442,14 +442,19 @@ class BaseController extends HomeController
{
$url = MODULE_NAME . '/' . CONTROLLER_NAME . '/' . ACTION_NAME;
$urlKey = substr(md5($url), 8, 16);
$key = $loginer['id'] . ':' . $urlKey;
$key = 'promote_access_limit:' . $loginer['id'] . ':' . $urlKey;
$check = Redis::exists($key);
if ($check) {
$count = Redis::incr($key);
if ($count > 60) {
Log::write('user_access_limit:' . date('Y-m-d H:i:s') . ' ' . $key . '[' . $url . ']', 'INFO');
$this->assign("ttl",Redis::ttl($key));
$this->display("index/accessLimit");
Log::write('promote_access_limit:' . date('Y-m-d H:i:s') . ' ' . $key . '[' . $url . ']', 'INFO');
$ttl = Redis::ttl($key);
if ($ttl == -1) {
Redis::incr($key);
Redis::expire($key, 60);
}
$this->assign('ttl', $ttl);
$this->display('Index/accessLimit');
die();
}
} else {

Loading…
Cancel
Save