mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 04:23:45 +01:00
Check if user is logged in check_banned
This commit is contained in:
3
main.py
3
main.py
@@ -84,6 +84,9 @@ def unauthorized_handler():
|
|||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def check_banned():
|
def check_banned():
|
||||||
|
if not hasattr(flask_login.current_user, "id"):
|
||||||
|
return
|
||||||
|
|
||||||
username = flask_login.current_user.id
|
username = flask_login.current_user.id
|
||||||
|
|
||||||
cur = get_db().cursor()
|
cur = get_db().cursor()
|
||||||
|
|||||||
Reference in New Issue
Block a user