master
Bob Mottram 2019-08-13 13:00:17 +01:00
parent 2cb5366ee9
commit 32d23fbf5f
1 changed files with 2 additions and 2 deletions

View File

@ -538,12 +538,12 @@ def suspendAccount(baseDir: str,nickname: str,salts: {}) -> None:
def removeAccount(baseDir: str,nickname: str,domain: str) -> bool: def removeAccount(baseDir: str,nickname: str,domain: str) -> bool:
"""Removes an account """Removes an account
""" """
# Don't suspend the admin # Don't remove the admin
adminNickname=getConfigParam(baseDir,'admin') adminNickname=getConfigParam(baseDir,'admin')
if nickname==adminNickname: if nickname==adminNickname:
return False return False
# Don't suspend moderators # Don't remove moderators
moderatorsFile=baseDir+'/accounts/moderators.txt' moderatorsFile=baseDir+'/accounts/moderators.txt'
if os.path.isfile(moderatorsFile): if os.path.isfile(moderatorsFile):
with open(moderatorsFile, "r") as f: with open(moderatorsFile, "r") as f: