Skip to content

Instantly share code, notes, and snippets.

@dipta007
Created June 13, 2020 09:46
Show Gist options
  • Save dipta007/4b50dfd921abff8ad252017fc1cc5413 to your computer and use it in GitHub Desktop.
Save dipta007/4b50dfd921abff8ad252017fc1cc5413 to your computer and use it in GitHub Desktop.
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