mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-24 12:07:28 +08:00
feat: add multiple hooks, pligun schedule support ,add hook:list artisan command
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Services\Auth;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\Plugin\HookManager;
|
||||
use App\Utils\CacheKey;
|
||||
use App\Utils\Helper;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
@@ -70,6 +71,7 @@ class LoginService
|
||||
$user->last_login_at = time();
|
||||
$user->save();
|
||||
|
||||
HookManager::call('user.login.after', $user);
|
||||
return [true, $user];
|
||||
}
|
||||
|
||||
@@ -111,6 +113,8 @@ class LoginService
|
||||
return [false, [500, __('Reset failed')]];
|
||||
}
|
||||
|
||||
HookManager::call('user.password.reset.after', $user);
|
||||
|
||||
// 清除邮箱验证码
|
||||
Cache::forget(CacheKey::get('EMAIL_VERIFY_CODE', $email));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user