app/Http/Controllers/AccountController.php 1 location
|
@@ 266-267 (lines=2) @@
|
| 263 |
|
*/ |
| 264 |
|
public function confirmActivation(Request $request): JsonResponse |
| 265 |
|
{ |
| 266 |
|
if (($mail = (new MailController)->getMail($request->json()->get('token'))) == null) |
| 267 |
|
return response()->json(['error' => 'activation.invalid_token'], 400); |
| 268 |
|
|
| 269 |
|
if (strpos($mail->link, 'change-email') !== false): |
| 270 |
|
$mail = str_replace('change-email/', '', $mail->link); |
app/Http/Controllers/AccountSecurityController.php 1 location
|
@@ 199-200 (lines=2) @@
|
| 196 |
|
*/ |
| 197 |
|
public function confirmChangePassword(Request $request): JsonResponse |
| 198 |
|
{ |
| 199 |
|
if (($mail = (new MailController)->getMail($request->json()->get('token'))) == null) |
| 200 |
|
return response()->json(null, 404); |
| 201 |
|
|
| 202 |
|
if (User::where('password', hash(Config::get('chocolatey.security.hash'), $request->json()->get('password')))->count() >= 1) |
| 203 |
|
return response()->json(['error' => 'password.used_earlier'], 400); |