Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email users on account security changes #1426

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

Fan2Shrek
Copy link
Contributor

@Fan2Shrek Fan2Shrek commented Mar 3, 2024

Fixes #1419

Notifying:

  • Username change
  • Email change
  • Password change
  • (Dis)connect github

Move the two-factor authentication notifier in an dedicated class

@@ -42,6 +43,8 @@ public function changePasswordAction(Request $request, UserPasswordHasherInterfa
$this->getEM()->persist($user);
$this->getEM()->flush();

$userNotifier->notifyChange($user->getEmail(), 'Your password has been changed');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to reuse this UserNotifier for the 2fa emails too I think, to keep it all the same, if you don't mind refactoring that. It probably needs the ability to pass in a custom email template filename tho as the 2fa emails contain some extra wording.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this done but no worries I'll do it after merging :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops I havent add the file sorry x)
I can made a PR fixing that later if you want :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no no worries I kinda have it sorted already :)

@Fan2Shrek Fan2Shrek force-pushed the feat/1419-user-notifier branch from cd482b9 to 5ca58b3 Compare March 7, 2024 09:11
@Fan2Shrek Fan2Shrek requested a review from Seldaek March 12, 2024 13:20
@Fan2Shrek Fan2Shrek force-pushed the feat/1419-user-notifier branch 4 times, most recently from 4c47443 to 33870f0 Compare March 19, 2024 17:56
@Fan2Shrek Fan2Shrek force-pushed the feat/1419-user-notifier branch from 33870f0 to 476854a Compare March 19, 2024 19:06
@Seldaek Seldaek merged commit 787d701 into composer:main Mar 21, 2024
3 checks passed
@Seldaek
Copy link
Member

Seldaek commented Mar 21, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email users on account security changes to alert them to potential compromise
2 participants