Disabled sending user registration emails if disabled in the config
This commit is contained in:
parent
ff523f3f66
commit
af7972d723
|
@ -73,16 +73,20 @@ class RegisteredUserController extends Controller
|
|||
$user = $request->name;
|
||||
$email = $request->email;
|
||||
|
||||
try {
|
||||
Mail::send('auth.user-confirmation', ['user' => $user, 'email' => $email], function ($message) use ($user) {
|
||||
$message->to(env('ADMIN_EMAIL'))
|
||||
->subject('New user registration');
|
||||
});
|
||||
} catch (\Exception $e) {}
|
||||
if(env('REGISTER_AUTH') == 'auth'){
|
||||
if(env('MANUAL_USER_VERIFICATION') == true){
|
||||
try {
|
||||
Mail::send('auth.user-confirmation', ['user' => $user, 'email' => $email], function ($message) use ($user) {
|
||||
$message->to(env('ADMIN_EMAIL'))
|
||||
->subject('New user registration');
|
||||
});
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
|
||||
try {
|
||||
$request->user()->sendEmailVerificationNotification();
|
||||
} catch (\Exception $e) {}
|
||||
try {
|
||||
$request->user()->sendEmailVerificationNotification();
|
||||
} catch (\Exception $e) {}
|
||||
}
|
||||
|
||||
event(new Registered($user));
|
||||
|
||||
|
|
Loading…
Reference in New Issue