From 964d0e611697efe5768c17606847fb263abef201 Mon Sep 17 00:00:00 2001 From: Tudor Amariei Date: Thu, 9 Jan 2025 10:37:11 +0200 Subject: [PATCH] Fix ngo hub users requesting a password reset --- backend/donations/views/account_management.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/donations/views/account_management.py b/backend/donations/views/account_management.py index c693fbc0..ae881f21 100644 --- a/backend/donations/views/account_management.py +++ b/backend/donations/views/account_management.py @@ -45,8 +45,12 @@ def post(self, request, *args, **kwargs): except self.user_model.DoesNotExist: user = None - if user: + if user and not user.is_ngohub_user: self._send_password_reset_email(user) + elif user.is_ngohub_user: + # TODO: send an e-mail to the user + # notify them that they should log in through NGO Hub + pass context["found"] = _("If the email address is valid, you will receive an email with instructions.")