@@ -44,7 +44,7 @@ |
||
| 44 | 44 | public function send(array $configuration, string $view = 'habbo-web-mail.confirm-mail') |
| 45 | 45 | { |
| 46 | 46 | try { |
| 47 | - Mail::send($view, $configuration, function ($message) use ($configuration) { |
|
| 47 | + Mail::send($view, $configuration, function($message) use ($configuration) { |
|
| 48 | 48 | $message->from(Config::get('chocolatey.contact'), Config::get('chocolatey.name')); |
| 49 | 49 | $message->to($configuration['mail']); |
| 50 | 50 | }); |
@@ -75,8 +75,9 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function forgotPassword(Request $request): JsonResponse |
| 77 | 77 | { |
| 78 | - if (($user = User::where('mail', $request->json()->get('email'))->first()) == null) |
|
| 79 | - return response()->json(''); |
|
| 78 | + if (($user = User::where('mail', $request->json()->get('email'))->first()) == null) { |
|
| 79 | + return response()->json(''); |
|
| 80 | + } |
|
| 80 | 81 | |
| 81 | 82 | $this->send([ |
| 82 | 83 | 'name' => $user->name, |
@@ -97,8 +98,9 @@ discard block |
||
| 97 | 98 | { |
| 98 | 99 | $mailRequest = Mail::where('token', $token)->where('used', '0')->first(); |
| 99 | 100 | |
| 100 | - if ($mailRequest !== null) |
|
| 101 | - $mailRequest->update(['used' => '1']); |
|
| 101 | + if ($mailRequest !== null) { |
|
| 102 | + $mailRequest->update(['used' => '1']); |
|
| 103 | + } |
|
| 102 | 104 | |
| 103 | 105 | return $mailRequest; |
| 104 | 106 | } |