mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 14:30:17 +02:00
Merge branch 'emailoverrideredirect' into 'master'
Fix Redirect to dashboard if not verifying email See merge request allianceauth/allianceauth!1268
This commit is contained in:
commit
9801ca0314
@ -139,6 +139,11 @@ class RegistrationView(BaseRegistrationView):
|
||||
email_subject_template = "registration/activation_email_subject.txt"
|
||||
success_url = reverse_lazy('registration_complete')
|
||||
|
||||
def get_success_url(self, user):
|
||||
if not getattr(settings, 'REGISTRATION_VERIFY_EMAIL', True):
|
||||
return reverse_lazy('authentication:dashboard')
|
||||
return super().get_success_url(user)
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
# We're storing a key in the session to pass user information from OAuth response. Make sure it's there.
|
||||
if not self.request.session.get('registration_uid', None) or not User.objects.filter(
|
||||
|
Loading…
x
Reference in New Issue
Block a user