mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
🐛 修复 BUG
This commit is contained in:
parent
9c7920049f
commit
23678302ba
@ -54,7 +54,9 @@ class RegisteredUserController extends Controller
|
||||
'password' => Hash::make($request->password),
|
||||
]);
|
||||
|
||||
event(new Registered($user));
|
||||
if (Utils::config(ConfigKey::IsUserNeedVerify)) {
|
||||
event(new Registered($user));
|
||||
}
|
||||
|
||||
Auth::login($user);
|
||||
|
||||
|
@ -3,10 +3,8 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Enums\ConfigKey;
|
||||
use App\Enums\Mail\SmtpOption;
|
||||
use App\Models\Group;
|
||||
use App\Utils;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
@ -43,12 +41,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
if (file_exists(base_path('installed.lock'))) {
|
||||
// 覆盖默认配置
|
||||
Config::set('app.name', Utils::config(ConfigKey::AppName));
|
||||
|
||||
/** @var Collection $mailConfigs */
|
||||
$mailConfigs = Utils::config(ConfigKey::Mail);
|
||||
if ($mailConfigs->get(SmtpOption::Host)) {
|
||||
Config::set('mail', array_merge(\config('mail'), $mailConfigs->toArray()));
|
||||
}
|
||||
Config::set('mail', array_merge(\config('mail'), Utils::config(ConfigKey::Mail)->toArray()));
|
||||
|
||||
$configs = Auth::check() && Auth::user()->group ?
|
||||
Auth::user()->group->configs :
|
||||
|
@ -22,7 +22,7 @@ return [
|
||||
ConfigKey::IsEnableApi => 1,
|
||||
ConfigKey::IsAllowGuestUpload => 1,
|
||||
ConfigKey::UserInitialCapacity => 512000,
|
||||
ConfigKey::IsUserNeedVerify => 1,
|
||||
ConfigKey::IsUserNeedVerify => 0,
|
||||
ConfigKey::Mail => [
|
||||
'default' => 'smtp',
|
||||
'mailers' => [
|
||||
|
Loading…
Reference in New Issue
Block a user