diff --git a/app/Http/Controllers/Api/Client/AccountController.php b/app/Http/Controllers/Api/Client/AccountController.php index 9551bf690..db7a1971d 100644 --- a/app/Http/Controllers/Api/Client/AccountController.php +++ b/app/Http/Controllers/Api/Client/AccountController.php @@ -50,9 +50,11 @@ class AccountController extends ClientApiController $original = $request->user()->email; $this->updateService->handle($request->user(), $request->validated()); - Activity::event('user:account.email-changed') - ->property(['old' => $original, 'new' => $request->input('email')]) - ->log(); + if ($original !== $request->input('email')) { + Activity::event('user:account.email-changed') + ->property(['old' => $original, 'new' => $request->input('email')]) + ->log(); + } return new JsonResponse([], Response::HTTP_NO_CONTENT); }