This commit is contained in:
iou1name 2019-09-29 15:28:44 -04:00
parent d8d6d6d5ec
commit 02b5a84648
2 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ def auth_required(func):
"FROM user_info LEFT JOIN user_session " "FROM user_info LEFT JOIN user_session "
"ON (user_info.id = user_session.user_id) " "ON (user_info.id = user_session.user_id) "
"WHERE user_info.id = $1 AND user_session.id = $2 " "WHERE user_info.id = $1 AND user_session.id = $2 "
"AND user_session.expires > NOW()", "AND user_info.active = TRUE AND user_session.expires > NOW()",
user_id, sid) user_id, sid)
if session: if session:
request['session'] = dict(session) request['session'] = dict(session)

View File

@ -54,6 +54,7 @@ async def send_confirmation(request, user_id, to_addr):
confirm_url = request.app.router['register'].url_for().with_query(d) confirm_url = request.app.router['register'].url_for().with_query(d)
confirm_url = 'https://' + config.server_domain + str(confirm_url) confirm_url = 'https://' + config.server_domain + str(confirm_url)
body = "Buckle up.\n" + confirm_url body = "Buckle up.\n" + confirm_url
send_mail(to_addr, "Confirm Email", body)
async def validate_register(request, form): async def validate_register(request, form):