Why send activation email on user update?
See original GitHub issueIf sending activation emails is enabled (SEND_ACTIVATION_EMAIL == True
), updating a user currently sends an activation email!
https://github.com/sunscrapers/djoser/blob/master/djoser/views.py#L148:
class UserViewSet(viewsets.ModelViewSet):
...
def perform_update(self, serializer):
super().perform_update(serializer)
user = serializer.instance
# should we send activation email after update?
if settings.SEND_ACTIVATION_EMAIL:
context = {"user": user}
to = [get_user_email(user)]
settings.EMAIL.activation(self.request, context).send(to)
What’s the purpose of sending an activation email with an activation link in this scenario (updating a user)? The account is already activated, and will remain activated after the update. A confirmation email would be understandable, but an activation email is puzzling.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Sending activation email - Account Management API
An activation email can be sent only to user accounts located in sub-tenants. Authenticate to the cloud platform via the Python shell. The...
Read more >(Djoser) Weird activation email when I update the user fields
Every time when I try to update my user with the PATCH method to the /users/me/ endpoint, an activation email is always sent....
Read more >Users not receiving activation email on secondary email address
Adding a secondary email address when the user gets created will also mandate that emails for activating the account will be sent to...
Read more >Prepare and Send Activation Link to registered User Email ...
In this lecture you will learn how to prepare and send an account activation link to users as they register, you will also...
Read more >Account Activation Emails Are Only Sent Once - Salesforce Help
Account activation emails are now only sent once. Previously, these emails were sent daily for seven days....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Right. That makes sense when the email is changed. But a user may be updated without changing their email. In fact, in my case, email is the username. So, changing it requires using the “set username” endpoint. The email field is a read-only field in my user serializer.
But to accommodate the general case, wouldn’t it make sense to send an activation email only if the email field is changed?
Any plans to release this?