diff --git a/goodchain/src/classes/User.py b/goodchain/src/classes/User.py index 2e32c05..6b60d4a 100644 --- a/goodchain/src/classes/User.py +++ b/goodchain/src/classes/User.py @@ -11,8 +11,13 @@ class User: self.password = password def login(self): + print("Keep input empty to return") input_username = input("Username: ") + if input_username == "": + return False input_password = getpass("Password: ") + if input_password == "": + return False hashed_password = UtilityHelper.computeHash(input_password) @@ -27,8 +32,13 @@ class User: return False def register(self): + print("Keep input empty to return") input_username = input("Username: ") + if input_username == "": + return False input_password = getpass("Password: ") + if input_password == "": + return False if len(input_username) < 4 or len(input_password) < 4: print(f"{UtilityHelper.errorMessage('Username or password is too short, inputs should be atleast 4 characters long')}")