mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 05:26:17 +00:00
Import statements and update configuration.
This commit is contained in:
@@ -56,6 +56,7 @@ use Illuminate\Auth\Events\Login;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Class UserEventHandler.
|
||||
@@ -203,7 +204,7 @@ class UserEventHandler
|
||||
if (false === $entry['notified']) {
|
||||
try {
|
||||
Notification::send($user, new UserLogin());
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
@@ -233,7 +234,7 @@ class UserEventHandler
|
||||
|
||||
try {
|
||||
Notification::send($owner, new AdminRegistrationNotification($event->user));
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
@@ -267,7 +268,7 @@ class UserEventHandler
|
||||
|
||||
try {
|
||||
Mail::to($newEmail)->send(new ConfirmEmailChangeMail($newEmail, $oldEmail, $url));
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
app('log')->error($e->getMessage());
|
||||
app('log')->error($e->getTraceAsString());
|
||||
|
||||
@@ -292,7 +293,7 @@ class UserEventHandler
|
||||
|
||||
try {
|
||||
Mail::to($oldEmail)->send(new UndoEmailChangeMail($newEmail, $oldEmail, $url));
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
app('log')->error($e->getMessage());
|
||||
app('log')->error($e->getTraceAsString());
|
||||
|
||||
@@ -304,7 +305,7 @@ class UserEventHandler
|
||||
{
|
||||
try {
|
||||
Notification::send($event->user, new UserFailedLoginAttempt($event->user));
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
@@ -328,7 +329,7 @@ class UserEventHandler
|
||||
{
|
||||
try {
|
||||
Notification::send($event->user, new UserNewPassword(route('password.reset', [$event->token])));
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
@@ -356,7 +357,7 @@ class UserEventHandler
|
||||
|
||||
try {
|
||||
Mail::to($invitee)->send(new InvitationMail($invitee, $admin, $url));
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
app('log')->error($e->getMessage());
|
||||
app('log')->error($e->getTraceAsString());
|
||||
|
||||
@@ -374,7 +375,7 @@ class UserEventHandler
|
||||
if ($sendMail) {
|
||||
try {
|
||||
Notification::send($event->user, new UserRegistrationNotification());
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
@@ -429,7 +430,7 @@ class UserEventHandler
|
||||
|
||||
try {
|
||||
Notification::send($event->user, new $class());
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
if (str_contains($message, 'Bcc')) {
|
||||
app('log')->warning('[Bcc] Could not send notification. Please validate your email settings, use the .env.example file as a guide.');
|
||||
|
||||
Reference in New Issue
Block a user