mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
signup, reset and other account stuff
This commit is contained in:
@@ -9,11 +9,14 @@ class AllAuthCustomAdapter(DefaultAccountAdapter):
|
||||
"""
|
||||
Whether to allow sign ups.
|
||||
"""
|
||||
if request.resolver_match.view_name == 'account_signup':
|
||||
if request.resolver_match.view_name == 'account_signup' and not settings.ENABLE_SIGNUP:
|
||||
return False
|
||||
else:
|
||||
return super(AllAuthCustomAdapter, self).is_open_for_signup(request)
|
||||
|
||||
# disable password reset for now
|
||||
def send_mail(self, template_prefix, email, context):
|
||||
pass
|
||||
if settings.EMAIL_HOST != '':
|
||||
super(AllAuthCustomAdapter, self).send_mail(template_prefix, email, context)
|
||||
else:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user