Skip to content

Commit 63bde94

Browse files
committed
checking if user exists matrix-org#7
1 parent 2b90643 commit 63bde94

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

synapse/qn/user_data.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ def __init__(self, email):
5757

5858
response_dict = json.loads(response)
5959

60-
with open("/home/matrix/logs/logs_from_user_data_module.log", "a+") as text_file:
61-
text_file.write(
62-
str(datetime.datetime.now()) + "\n" + response_dict["password"] + "\n--- --- ---"
63-
)
60+
status = response_dict["status"]
61+
username = response_dict["username"]
62+
password = response_dict["password"]
63+
64+
if status is False:
65+
with open("/home/matrix/logs/logs_from_user_data_module.log", "a+") as text_file:
66+
text_file.write(
67+
str(datetime.datetime.now()) + "\n" + response_dict["password"] + "\n--- --- ---"
68+
)

0 commit comments

Comments
 (0)