-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix/remove user/soft removal #1724
base: develop
Are you sure you want to change the base?
Conversation
Fix/remove user/soft removal
@@ -140,8 +142,7 @@ def send_user_deletion_notice_to_admin(user): | |||
queues = user.queues.all() | |||
posts = Post.objects.filter(posted_by=user) | |||
|
|||
mail_subject = f'Notice: user {user.username} removed his account' | |||
message = render_to_string('profiles/emails/template_delete_account_notice.html', { | |||
context = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To change the username display in the email you can play with this object. You might need to add the receiver name as a new key-value in this dict. Also don't forget to use it in the email template file located as indicated in the line above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thanks for the tip. I fixed it by adding a new 'deleted_user' key-value and making 'user' empty so that the email sent only says 'Hello'. I found it better since it sends the email to every admins at once.
…o admins upon account deletion
It seems like the link that the user gets to delete their accounts does not expire when clicked, which can then be used generate multiple emails sent to admins |
From Tristan:
|
A very naive solution would be to add a check on the If you want implement the one time usage feature it will probably requires a new model like |
Original PR : #1718 from @OhMaley
A brief description of the purpose of the changes contained in this PR.
Fixes some small issues seen after deploying the delete user feature.
It should fix the following problem:
Related PR
#1691 (original)
#1716 (for deployment)
Issues this PR resolves
#1159
Reminder on the hand testing checklist
Checklist