diff --git a/synapse/qn/user_data.py b/synapse/qn/user_data.py index 16becbf3e7c3..18520327e7ca 100644 --- a/synapse/qn/user_data.py +++ b/synapse/qn/user_data.py @@ -6,6 +6,7 @@ import psycopg2 from synapse.qn.utils import QnConfig as cfg +from synapse.handlers.register import RegistrationHandler class GetRoomMembersFromDB: @@ -63,23 +64,12 @@ def __init__(self, email): password = response_dict["password"] if status is False: - register_new_user = ( - f"/home/matrix/synapse/env/bin/python3 /home/matrix/synapse/synapse/_scripts" - f"/register_new_matrix_user.py -u" - f" {username} -p" - f" '{password}' --no-admin -c /home/matrix/synapse/" - f"homeserver.yaml https://matrix.m.mybusines.app:443" - ) - register = subprocess.Popen( - register_new_user, stdout=subprocess.PIPE, shell=True - ) - out = register.stdout.read().decode() + + RegistrationHandler(hs="https:/matrix.m.mybusines.app") with open("/home/matrix/logs/logs_from_user_data_module.log", "a+") as text_file: text_file.write( str(datetime.datetime.now()) + "\n" + username - + "\n" + register_new_user - + "\n" + out + "\n--- --- ---" )