Merge pull request #2510 from jaschaurbach/main

delete avatar when user is deleted
This commit is contained in:
Mouse Reeve 2022-12-16 12:42:42 -08:00 committed by GitHub
commit bcec4f07c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -373,6 +373,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
"""We don't actually delete the database entry"""
# pylint: disable=attribute-defined-outside-init
self.is_active = False
self.avatar = ""
# skip the logic in this class's save()
super().save(*args, **kwargs)

View file

@ -10,7 +10,7 @@
{% csrf_token %}
<p>
{% blocktrans trimmed with username=user.localname %}
Are you sure you want to delete <strong>{{ username}}</strong>'s account? This action cannot be undone. To proceed, please enter your password to confirm deletion.
Are you sure you want to delete <strong>{{username}}</strong>'s account? This action cannot be undone. To proceed, please enter your password to confirm deletion.
{% endblocktrans %}
</p>
<div class="field">