summaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
authorMarian Sigler <m@qjym.de>2012-09-28 03:21:13 +0200
committerMarian Sigler <m@qjym.de>2012-09-28 03:21:13 +0200
commitee35835b75119e57dd23f13fba95c02e50125a44 (patch)
treefc99d7f25059e7dde6cfac92d54ec9c038651c56 /app.py
parent2676e1d7130160673c408987c4aeef83f9f57b6d (diff)
downloadweb-ee35835b75119e57dd23f13fba95c02e50125a44.tar.gz
web-ee35835b75119e57dd23f13fba95c02e50125a44.tar.bz2
web-ee35835b75119e57dd23f13fba95c02e50125a44.zip
Add script to create accounts (for usernames that are in the blacklist)
Diffstat (limited to 'app.py')
-rw-r--r--app.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app.py b/app.py
index dfe3b5a..adc2eb8 100644
--- a/app.py
+++ b/app.py
@@ -23,6 +23,8 @@ def ldap_connect():
g.ldap = account.AccountService(app.config['LDAP_HOST'], app.config['LDAP_BASE_DN'],
app.config['LDAP_ADMIN_USER'], app.config['LDAP_ADMIN_PASS'], app.all_services)
+@app.before_request
+def initialize_user():
g.user = None
if 'username' in session and 'password' in session:
@@ -100,7 +102,7 @@ def register():
@templated('register_complete.html')
@logout_required
def register_complete(token):
- #TODO: check for double uids
+ #TODO: check for double uids and mail
username, mail = http_verify_confirmation('register', token.encode('ascii'), timeout=3*24*60*60)