Add logged_in to user session

This commit is contained in:
James Wang 2015-12-24 20:49:15 -05:00
parent 2680034587
commit 29e26e54d9

View file

@ -58,6 +58,7 @@ def user_login():
if utils.check_password(user.password, password):
session["username"] = user.username
session["admin"] = user.admin
session["logged_in"] = True
return { "success": 1, "message": "Success!" }
else:
return { "success": 0, "message": "Invalid credentials." }