See #187: Front logic for password reset and email confirmation
This commit is contained in:
parent
3b9024129d
commit
44ebb92874
6 changed files with 96 additions and 3 deletions
|
|
@ -0,0 +1,8 @@
|
|||
{% load account %}{% user_display user as user_display %}{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name }}!
|
||||
|
||||
You're receiving this e-mail because user {{ user_display }} at {{ site_domain }} has given yours as an e-mail address to connect their account.
|
||||
|
||||
To confirm this is correct, go to {{ funkwhale_url }}/auth/email/confirm?key={{ key }}
|
||||
{% endblocktrans %}{% endautoescape %}
|
||||
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you from {{ site_name }}!
|
||||
{{ site_domain }}{% endblocktrans %}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
from allauth.account.adapter import DefaultAccountAdapter
|
||||
from django.conf import settings
|
||||
|
||||
from allauth.account.adapter import DefaultAccountAdapter
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
|
||||
|
|
@ -8,3 +9,7 @@ class FunkwhaleAccountAdapter(DefaultAccountAdapter):
|
|||
def is_open_for_signup(self, request):
|
||||
manager = global_preferences_registry.manager()
|
||||
return manager['users__registration_enabled']
|
||||
|
||||
def send_mail(self, template_prefix, email, context):
|
||||
context['funkwhale_url'] = settings.FUNKWHALE_URL
|
||||
return super().send_mail(template_prefix, email, context)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue