def admincontrol_acctverifylink_(request): form = request.web_input(username="", email="") token = login.get_account_verification_token( username=form.username, email=form.email) if token: return Response(d.webpage(request.userid, "admincontrol/acctverifylink.html", [token])) return Response(d.errorpage(request.userid, "No pending account found."))
def POST(self): form = web.input(username="", email="") token = login.get_account_verification_token( username=form.username, email=form.email) if token: return d.webpage(self.user_id, "admincontrol/acctverifylink.html", [token]) return d.errorpage(self.user_id, "No pending account found.")
def POST(self): form = web.input(username="", email="") token = login.get_account_verification_token(username=form.username, email=form.email) if token: return d.webpage(self.user_id, "admincontrol/acctverifylink.html", [token]) return d.errorpage(self.user_id, "No pending account found.")
def admincontrol_acctverifylink_(request): token = login.get_account_verification_token( username=request.params.get('username', ''), email=request.params.get('email', '')) if token: return Response( d.webpage(request.userid, "admincontrol/acctverifylink.html", [token])) return Response(d.errorpage(request.userid, "No pending account found."))
def test_acct_verif_token_returned_if_username_provided_to_function(): form = Bag(username=user_name, password='******', passcheck='0123456789', email=email_addr, emailcheck=email_addr, day='12', month='12', year=arrow.now().year - 19) d.engine.execute(d.meta.tables["logincreate"].insert(), { "token": token, "username": form.username, "login_name": form.username, "hashpass": login.passhash(raw_password), "email": form.email, "birthday": arrow.Arrow(2000, 1, 1), }) acct_verification_token = login.get_account_verification_token(email=None, username=form.username) assert token == acct_verification_token
def test_acct_verif_token_returned_if_username_provided_to_function(): form = Bag(username=user_name, password='******', passcheck='0123456789', email=email_addr, emailcheck=email_addr, day='12', month='12', year=arrow.now().year - 19) d.engine.execute(d.meta.tables["logincreate"].insert(), { "token": token, "username": form.username, "login_name": form.username, "hashpass": login.passhash(raw_password), "email": form.email, "birthday": arrow.Arrow(2000, 1, 1), "unixtime": arrow.now(), }) acct_verification_token = login.get_account_verification_token(email=None, username=form.username) assert token == acct_verification_token