Merge pull request #91 from intonarumori/develop

added option to disable register email
This commit is contained in:
Matt Wright
2013-02-20 15:06:46 -08:00
3 changed files with 6 additions and 2 deletions
+2
View File
@@ -158,6 +158,8 @@ Miscellaneous
.. tabularcolumns:: |p{6.5cm}|p{8.5cm}|
======================================= ========================================
``SECURITY_SEND_REGISTER_EMAIL`` Specifies whether registration email is
sent. Defaults to ``True``.
``SECURITY_CONFIRM_EMAIL_WITHIN`` Specifies the amount of time a user has
before their confirmation link expires.
Always pluralized the time unit for this
+1
View File
@@ -56,6 +56,7 @@ _default_config = {
'TRACKABLE': False,
'PASSWORDLESS': False,
'CHANGEABLE': False,
'SEND_REGISTER_EMAIL': True,
'LOGIN_WITHIN': '1 days',
'CONFIRM_EMAIL_WITHIN': '5 days',
'RESET_PASSWORD_WITHIN': '5 days',
+3 -2
View File
@@ -36,7 +36,8 @@ def register_user(**kwargs):
user_registered.send(dict(user=user, confirm_token=token),
app=app._get_current_object())
send_mail(config_value('EMAIL_SUBJECT_REGISTER'), user.email, 'welcome',
user=user, confirmation_link=confirmation_link)
if config_value('SEND_REGISTER_EMAIL'):
send_mail(config_value('EMAIL_SUBJECT_REGISTER'), user.email, 'welcome',
user=user, confirmation_link=confirmation_link)
return user