Exemple #1
0
def recover_pwd(token):
    res = ops.verifyLogin(request.cookies.email, request.cookies.sessionkey)
    if res["loggedin"]:
        return redirect("/")
    valid = ops.verifyToken(token, "recovery")
    return template(
        "recoverpwd.tpl", **{
            "siteconfig": siteconfig,
            "redirectUrl": "/",
            "token": token,
            "tokenValid": valid
        })
Exemple #2
0
def create_account(token):
    res = ops.verifyLogin(request.cookies.email, request.cookies.sessionkey)
    if res["loggedin"]:
        return redirect("/")
    valid = ops.verifyToken(token, "register")
    return template(
        "createaccount.tpl", **{
            "siteconfig": siteconfig,
            "redirectUrl": "/",
            "token": token,
            "tokenValid": valid
        })