mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 03:57:27 +08:00
feat: add multiple hooks, pligun schedule support ,add hook:list artisan command
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Models\InviteCode;
|
||||
use App\Models\Plan;
|
||||
use App\Models\User;
|
||||
use App\Services\CaptchaService;
|
||||
use App\Services\Plugin\HookManager;
|
||||
use App\Services\UserService;
|
||||
use App\Utils\CacheKey;
|
||||
use App\Utils\Dict;
|
||||
@@ -141,6 +142,8 @@ class RegisterService
|
||||
return [false, $error];
|
||||
}
|
||||
|
||||
HookManager::call('user.register.before', $request);
|
||||
|
||||
$email = $request->input('email');
|
||||
$password = $request->input('password');
|
||||
$inviteCode = $request->input('invite_code');
|
||||
@@ -164,6 +167,8 @@ class RegisterService
|
||||
return [false, [500, __('Register failed')]];
|
||||
}
|
||||
|
||||
HookManager::call('user.register.after', $user);
|
||||
|
||||
// 清除邮箱验证码
|
||||
if ((int) admin_setting('email_verify', 0)) {
|
||||
Cache::forget(CacheKey::get('EMAIL_VERIFY_CODE', $email));
|
||||
|
||||
Reference in New Issue
Block a user