diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php index f43863e4c..76176d0ac 100644 --- a/Application/Admin/Controller/AuthManagerController.class.php +++ b/Application/Admin/Controller/AuthManagerController.class.php @@ -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, diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index ab6d28ccf..55a3f4f52 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -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('手机号码已存在!'); } diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 69d5b8ec2..dc48af7c0 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -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 {