def check_login_simple(username, password): user = auth.get_user(username=username) if not user: _log.info("User %r not found", username) hook_handle("auth_fake_login_attempt") return None if not auth.check_password(password, user.pw_hash): _log.warn("Wrong password for %r", username) return None _log.info("Logging %r in", username) return user