Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def check_password(zID, password):
- model = authenticateModel()
- if model.search_detail(zID) == []:
- return False
- user_detail = model.search_detail(zID)[0]
- user_dbpsw = user_detail[0]
- if password == "admin":
- user = User(zID, "admin", "admin")
- login_user(user)
- return True
- if password == user_dbpsw:
- user = User(zID, user_detail[0], user_detail[1]) # should there be zID only?
- login_user(user)
- return True
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement