delete avatar when user is deleted

This commit is contained in:
Jascha Urbach 2022-12-15 23:01:56 +01:00
parent 89478ac87e
commit 0744bd5385
No known key found for this signature in database
GPG key ID: A43A844B114F9B08
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">