def get_current_user(self): userkey = helpers.get_user_cookie(self) if len(userkey) >0: user = db.get(db.Key(userkey)) if user: user.put() else: user = False return user
def do_logout(self): userkey = helpers.get_user_cookie(self) if len(userkey) >0: user = db.get(db.Key(userkey)) if user: user.put() else: user = False helpers.destroy_user_cookie(self)