|
@@ 112-114 (lines=3) @@
|
| 109 |
|
*/ |
| 110 |
|
public function confirmActivation(Request $request): JsonResponse |
| 111 |
|
{ |
| 112 |
|
if (Mail::get($request->json()->get('token')) == null) { |
| 113 |
|
return response()->json(['error' => 'activation.invalid_token'], 400); |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
ChocolateyId::find(Mail::get()->mail)->update(['mail_verified' => '1']); |
| 117 |
|
|
|
@@ 222-224 (lines=3) @@
|
| 219 |
|
*/ |
| 220 |
|
public function confirmChangePassword(Request $request): JsonResponse |
| 221 |
|
{ |
| 222 |
|
if (Mail::get($request->json()->get('token')) == null) { |
| 223 |
|
return response()->json(null, 404); |
| 224 |
|
} |
| 225 |
|
|
| 226 |
|
ChocolateyId::find(Mail::get()->mail)->update(['password' => hash(Config::get('chocolatey.security.hash'), $request->json()->get('password'))]); |
| 227 |
|
|