Browse Source

feat(admin): 增加注册时是否开启每日邮件

laurieryayoi 5 years ago
parent
commit
3afcdf2844
2 changed files with 10 additions and 0 deletions
  1. 1 0
      src/Controllers/AuthController.php
  2. 9 0
      src/Services/DefaultConfig.php

+ 1 - 0
src/Controllers/AuthController.php

@@ -393,6 +393,7 @@ class AuthController extends BaseController
         $user->auto_reset_day       = $_ENV['reg_auto_reset_day'];
         $user->auto_reset_bandwidth = $_ENV['reg_auto_reset_bandwidth'];
         $user->money                = 0;
+        $user->sendDailyMail        = Config::getconfig('Register.bool.send_dailyEmail');
 
         //dumplin:填写邀请人,写入邀请奖励
         $user->ref_by = 0;

+ 9 - 0
src/Services/DefaultConfig.php

@@ -312,6 +312,15 @@ class DefaultConfig
                 'operator_id'   => 0,
                 'operator_name' => '系统默认',
             ],
+            'Register.bool.send_dailyEmail' => [
+                'key'           => $key,
+                'type'          => 'bool',
+                'value'         => '1',
+                'name'          => '注册时是否开启每日邮件',
+                'comment'       => '',
+                'operator_id'   => 0,
+                'operator_name' => '系统默认',
+            ],
             'Register.string.Email_verify_ttl' => [
                 'key'           => $key,
                 'type'          => 'string',