Updated login

This commit is contained in:
Tracker-Friendly 2023-11-20 00:51:01 +00:00
parent 9b85c8fdbd
commit ba6b0b851f
1 changed files with 13 additions and 1 deletions

View File

@ -65,7 +65,19 @@ def delete():
if passwordhash: if passwordhash:
if verify_hash == passwordhash: if verify_hash == passwordhash:
return "Your account would have been deleted... if this worked. Which it doesn't. Email postmaster@hectabit.org to delete your email." # return "Your account would have been deleted... if this worked. Which it doesn't. Email postmaster@hectabit.org to delete your email."
cmd = ["maddy", "creds", "delete", key_to_fetch]
result = subprocess.run(" ".join(cmd), shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if result.returncode == 0:
# Command executed successfully
return "Email deleted!"
else:
# Handle errors, log them, and return False
error_message = result.stderr.decode("utf-8")
print(f"Error deleting email account: {error_message}")
return "Error deleting email account!"
else: else:
return "Incorrect email or password" return "Incorrect email or password"
else: else: