about summary refs log tree commit diff
path: root/wqflask/flask_security/registerable.py
diff options
context:
space:
mode:
authorzsloan2018-03-29 10:36:12 -0500
committerGitHub2018-03-29 10:36:12 -0500
commitb215b5fe5c6d13f0ed445106230e1e38db71c918 (patch)
tree97f1f47b092bef38856ac34c1bd745e471c38311 /wqflask/flask_security/registerable.py
parente67e3a76fca0bad4796853eb58140a412922bc9c (diff)
parente0c706c51c834caa836ecffd27a5d18fc23178ff (diff)
downloadgenenetwork2-b215b5fe5c6d13f0ed445106230e1e38db71c918.tar.gz
Merge pull request #297 from pjotrp/testing
Testing
Diffstat (limited to 'wqflask/flask_security/registerable.py')
-rw-r--r--wqflask/flask_security/registerable.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/wqflask/flask_security/registerable.py b/wqflask/flask_security/registerable.py
deleted file mode 100644
index 4606c7c6..00000000
--- a/wqflask/flask_security/registerable.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
-    flask.ext.security.registerable
-    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-    Flask-Security registerable module
-
-    :copyright: (c) 2012 by Matt Wright.
-    :license: MIT, see LICENSE for more details.
-"""
-
-from flask import current_app as app
-from werkzeug.local import LocalProxy
-
-from .confirmable import generate_confirmation_link
-from .signals import user_registered
-from .utils import do_flash, get_message, send_mail, encrypt_password, \
-     config_value
-
-# Convenient references
-_security = LocalProxy(lambda: app.extensions['security'])
-
-_datastore = LocalProxy(lambda: _security.datastore)
-
-
-def register_user(**kwargs):
-    print "in register_user kwargs:", kwargs
-    confirmation_link, token = None, None
-    kwargs['password'] = encrypt_password(kwargs['password'])
-    user = _datastore.create_user(**kwargs)
-    _datastore.commit()
-
-    if _security.confirmable:
-        confirmation_link, token = generate_confirmation_link(user)
-        do_flash(*get_message('CONFIRM_REGISTRATION', email=user.email))
-
-    user_registered.send(dict(user=user, confirm_token=token),
-                         app=app._get_current_object())
-
-    if config_value('SEND_REGISTER_EMAIL'):
-        send_mail(config_value('EMAIL_SUBJECT_REGISTER'), user.email, 'welcome',
-                user=user, confirmation_link=confirmation_link)
-
-    return user