Advertisement
Guest User

Untitled

a guest
Oct 10th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def check_password(zID, password):
  2. model = authenticateModel()
  3.  
  4. if model.search_detail(zID) == []:
  5. return False
  6. user_detail = model.search_detail(zID)[0]
  7. user_dbpsw = user_detail[0]
  8. if password == "admin":
  9. user = User(zID, "admin", "admin")
  10. login_user(user)
  11. return True
  12. if password == user_dbpsw:
  13. user = User(zID, user_detail[0], user_detail[1]) # should there be zID only?
  14. login_user(user)
  15. return True
  16. return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement