Пример #1
0
def debug_login():
    from yelandur.models import User
    try:
        user_id = request.args['id']
        u = User.get(user_id)
        if not u:
            abort(404)
        login_user(u)
        return "Logged '{}' in".format(user_id)
    except KeyError:
        abort(400)
Пример #2
0
def load_user_by_user_id(user_id):
    from yelandur.models import User
    return User.get(user_id)
Пример #3
0
def load_user_by_browserid(browserid_data):
    from yelandur.models import User
    return User.get_or_create_by_email(browserid_data.get('email'))