def closeGame(self, user): """Close all of the game channels and tell the users that user is logged off""" # Get the channels and close them um = UserManager() # Get the datastore user u = User.all().filter('FacebookID =', user.FacebookID).get() um.logoutUser(u) return True
def loginUserToGame(self, user): """The login user to the game with the game channels""" # The user manager um = UserManager() # Get the datastore user u = User.all().filter('FacebookID =', user.FacebookID).get() # Login the user. Send the login data to all of the users # and the current login state for the user. um.loginUser(u) return True