Skip to content

Add admin email notification on new user registration#29

Merged
andreagrandi merged 1 commit intomasterfrom
feature/notify-new-user-registration
Mar 19, 2026
Merged

Add admin email notification on new user registration#29
andreagrandi merged 1 commit intomasterfrom
feature/notify-new-user-registration

Conversation

@andreagrandi
Copy link
Copy Markdown
Owner

Summary

  • Adds a notify_new_registration() function in users/notifications.py that emails the admin when a new user signs up
  • Covers both form-based registration and Google OAuth signup paths
  • Includes the username, email, registration method, and an admin link in the notification
  • Follows the existing notification pattern from libraries/notifications.py
  • Uses the existing ADMIN_NOTIFICATION_EMAIL setting and Resend email backend — no new configuration needed

Test plan

  • 4 new tests in users/test_notifications.py (correct email content, OAuth method label, no email when setting is empty, silent failure on SMTP errors)
  • Full test suite passes (485 tests)

Sends an email to ADMIN_NOTIFICATION_EMAIL whenever a user registers,
covering both form-based and Google OAuth signup paths. Follows the
existing notification pattern from libraries/notifications.py.
@andreagrandi andreagrandi merged commit be5b5df into master Mar 19, 2026
6 checks passed
@andreagrandi andreagrandi deleted the feature/notify-new-user-registration branch March 19, 2026 20:32
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.

1 participant