fix: registration/login button

fix: init user registrations
This commit is contained in:
Andras Bacsai
2023-06-29 17:16:50 +02:00
parent 80af200c9f
commit fed35d9c13
3 changed files with 8 additions and 4 deletions

View File

@@ -52,6 +52,11 @@ class FortifyServiceProvider extends ServiceProvider
Fortify::loginView(function () {
$settings = InstanceSettings::get();
$users = User::count();
if ($users == 0) {
// If there are no users, redirect to registration
return redirect()->route('register');
}
return view('auth.login', [
'is_registration_enabled' => $settings->is_registration_enabled
]);