def registerUser(self): fName = self.signIn.firstNameEdit.text() sName = self.signIn.secondNameEdit.text() mName = self.signIn.middleNameEdit.text() phone = self.signIn.phoneEdit.text() adminCode = self.signIn.adminCodeEdit.text() if (adminCode == "1111"): userType = UserTypes.Administrator else: userType = UserTypes.Reader user = User(-1, phone, fName, sName, mName) user._print() ID = self.CSV.AddUser(user, userType) print("Result: ") if (ID == -1): print("This user is already registered") else: print("ID = ", ID) self.thread.registerUser(ID)