From fa4f4f144169011b5003d4906522318940a09bf9 Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Sat, 19 Mar 2022 16:48:21 +0100 Subject: [PATCH] Added email verification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added email verification after user registration. After a user registered, an email is sent to the email used to sign up. The mail contains a verification link which is required to complete the registration process. This feature can be turned off in the Admin Panel under: Admin>Config by changing the setting "Register_auth" from "verified" to "auth". Read more about this on the Blog here: https://blog.littlelink-custom.com/optional-email-verification/ --- .env | 4 ++++ app/Models/User.php | 2 +- resources/views/auth/verify-email.blade.php | 2 +- routes/web.php | 2 +- storage/backups/default_settings | 9 ++++++--- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 719943f..ea17cab 100644 --- a/.env +++ b/.env @@ -1,3 +1,7 @@ +#Email verification=Changes if users have to verify their email after registration. +#=Register_auth either auth or verified. If auth is selected, no verification is required. Default is verified. +Register_auth=verified + #App Settings=Changes settings regarding your LittleLink Custom installation. You probably only want to change the App Name setting. #=App_Name changes the displayed name for the App in the title, for example. App_Name="LittleLink Custom" diff --git a/app/Models/User.php b/app/Models/User.php index 804799b..a481d17 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -class User extends Authenticatable +class User extends Authenticatable implements MustVerifyEmail { use HasFactory, Notifiable; diff --git a/resources/views/auth/verify-email.blade.php b/resources/views/auth/verify-email.blade.php index dbb42cb..fb88135 100755 --- a/resources/views/auth/verify-email.blade.php +++ b/resources/views/auth/verify-email.blade.php @@ -7,7 +7,7 @@