# Path: wikked/web.py
# def get_wiki():
# def uncaching_wiki_updater(wiki, url):
# def user_loader(username):
# def get_read_url(url):
# def get_edit_url(url):
# def get_rev_url(url, rev):
# def get_diff_url(url, rev1=None, rev2=None):
#     def async_updater(wiki):
#     def on_request_started(sender, **extra):
#     def on_request_tearing_down(sender, **extra):


from flask import request
from flask_login import login_user
from wikked.web import app, get_wiki


def do_login_user():
    username = request.form.get('username')
    password = request.form.get('password')
    remember = request.form.get('remember')

    wiki = get_wiki()
    user = wiki.auth.getUser(username)
    if user is not None and app.bcrypt:

# Path: wikked/web.py
# def get_wiki():
# def uncaching_wiki_updater(wiki, url):
# def user_loader(username):
# def get_read_url(url):
# def get_edit_url(url):
# def get_rev_url(url, rev):
# def get_diff_url(url, rev1=None, rev2=None):
#     def async_updater(wiki):
#     def on_request_started(sender, **extra):
#     def on_request_tearing_down(sender, **extra):


# Path: wikked/webimpl/admin.py
from flask import request
from flask_login import login_user
from wikked.web import app, get_wiki



def do_login_user():
    username = request.form.get('username')
    password = request.form.get('password')
    remember = request.form.get('remember')

    wiki = get_wiki()
    user = wiki.auth.getUser(username)
    if user is not None and app.bcrypt:

        if app.bcrypt.check_password_hash(user.password, password):