forked from rDrama/rDrama
dsfsfd
parent
eeae84ec15
commit
25c569cc36
|
@ -14,11 +14,10 @@ def get_logged_in_user():
|
|||
v.client = client
|
||||
return v
|
||||
else:
|
||||
nonce = session.get("login_nonce", 0)
|
||||
logged_in_user = session.get("logged_in_user")
|
||||
|
||||
if not logged_in_user: return None
|
||||
|
||||
nonce = session.get("login_nonce", 0)
|
||||
try:
|
||||
if g.db: v = g.db.query(User).filter_by(id=logged_in_user).one_or_none()
|
||||
else: return None
|
||||
|
|
|
@ -134,10 +134,9 @@ def login_post():
|
|||
else:
|
||||
abort(400)
|
||||
|
||||
session["logged_in_user"] = account.id
|
||||
session["session_id"] = token_hex(52)
|
||||
session["logged_in_user"] = account.id
|
||||
session["login_nonce"] = account.login_nonce
|
||||
session.permanent = True
|
||||
|
||||
if account.id not in (PW1_ID,PW2_ID): check_for_alts(account.id)
|
||||
|
||||
|
@ -338,8 +337,8 @@ def sign_up_post(v):
|
|||
|
||||
if "rama" in request.host: send_notification(new_user.id, WELCOME_MSG)
|
||||
|
||||
session["logged_in_user"] = new_user.id
|
||||
session["session_id"] = token_hex(52)
|
||||
session["logged_in_user"] = new_user.id
|
||||
|
||||
g.db.commit()
|
||||
|
||||
|
|
Loading…
Reference in New Issue