def save(self, domain_override=None,
             subject_template_name='accounts/emails/password_reset_subject.txt',  # NoQA
             email_template_name='accounts/emails/password_reset_email.html',
             use_https=False, token_generator=default_token_generator,
             from_email=None, request=None, html_email_template_name=None):
        from django.core.mail import send_mail
        email = self.cleaned_data["email"]
        active_users = User._default_manager.filter(
            email__iexact=email, is_active=True)

        for user in active_users:
            # Make sure that no email is sent to a user that actually has
            # a password marked as unusable
            if not user.has_usable_password():
                continue
            if not domain_override:
                site = get_current_site(request)
                domain = site.domain
            else:
                site = Site(name=domain_override,
                            domain=domain_override)
                domain = site.domain

            context = {
                'email': user.email,
                'domain': domain,
                'site': site,
                'uid': urlsafe_base64_encode(force_bytes(user.pk)),
                'user': user,
                'token': token_generator.make_token(user),
                'protocol': 'https' if use_https else 'http',
                # TODO: dynamically retrieve color from CSS
                'link_color': 'e51e41'
            }

            subject = loader.render_to_string(subject_template_name, context)
            # Email subject *must not* contain newlines
            subject = ''.join(subject.splitlines())

            email = loader.render_to_string(email_template_name, context)

            if html_email_template_name:
                html_email = loader.render_to_string(html_email_template_name,
                                                     context)
            else:
                html_email = None

            send_mail(subject, email, from_email,
                      [user.email], html_message=html_email)
Checks whether the passed user has passed permission for passed
dataset/ETHPy150Open nlhkabu/connect/connect/accounts/forms.py/CustomPasswordResetForm.save--crossover with--dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/common/permissions/backend.py/ExpedientPermissionsBackend.has_perm