Created
June 13, 2020 09:46
-
-
Save dipta007/4b50dfd921abff8ad252017fc1cc5413 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_password(username, password): | |
user = user_model.find_by_username(username) | |
if user.password != password: | |
user.increase_wrong_attempt() # Side Effect | |
return False | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment