1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-14 15:17:40 +00:00

Delete user working from user table (#1938)

Comment in helper
This commit is contained in:
Ozzieisaacs
2021-04-10 11:32:11 +02:00
parent 2d73f541c0
commit ae97e87506
3 changed files with 64 additions and 38 deletions

View File

@@ -795,8 +795,8 @@ def tags_filters():
# checks if domain is in database (including wildcards)
# example SELECT * FROM @TABLE WHERE 'abcdefg' LIKE Name;
# from https://code.luasoftware.com/tutorials/flask/execute-raw-sql-in-flask-sqlalchemy/
# in all calls the email address is checked for validity
def check_valid_domain(domain_text):
# domain_text = domain_text.split('@', 1)[-1].lower()
sql = "SELECT * FROM registration WHERE (:domain LIKE domain and allow = 1);"
result = ub.session.query(ub.Registration).from_statement(text(sql)).params(domain=domain_text).all()
if not len(result):