This commit is contained in:
Aevann1 2022-04-18 00:47:30 +02:00
parent b70b8b5542
commit 0ff37f739f
2 changed files with 3 additions and 18 deletions

View file

@ -573,21 +573,6 @@ class User(Base):
return data
def deletepfp(self):
if self.highres and '/images/' in self.highres:
image = '/images/' + self.highres.split('/images/')[1]
if path.exists(image): remove(image)
if self.profileurl and '/images/' in self.profileurl:
image = '/images/' + self.profileurl.split('/images/')[1]
if path.exists(image): remove(image)
self.highres = None
self.profileurl = None
def deletebanner(self):
if self.bannerurl and '/images/' in self.bannerurl:
image = '/images/' + self.bannerurl.split('/images/')[1]
if path.exists(image): remove(image)
self.bannerurl = None
def ban(self, admin=None, reason=None, days=0):
if days: