Browse Source

每个设备每个月注册最多用户数量

lizhen_gitee 6 months ago
parent
commit
422873ef5b
2 changed files with 3 additions and 1 deletions
  1. 2 1
      application/common/library/Auth.php
  2. 1 0
      application/extra/site.php

+ 2 - 1
application/common/library/Auth.php

@@ -215,7 +215,8 @@ class Auth
                 'plat_unique_id' => $extend['plat_unique_id'],
             ];
             $check_lastuser = Db::name('user')->where($map)->whereTime('jointime','month')->count();
-            if($check_lastuser >= 2){
+            $month_register_maxnumber = config('site.month_register_maxnumber');
+            if($check_lastuser >= $month_register_maxnumber){
                 $this->setError('本月注册数已满,请下个月在注册');
                 return false;
             }

+ 1 - 0
application/extra/site.php

@@ -91,4 +91,5 @@ return array (
   'kefu_url' => 'https://www.baidu.com',
   'sixin_oneday_user_times' => '10',
   'app_find_show' => '1',
+  'month_register_maxnumber' => '2',
 );