'Sends email with username.'

def save(self, text_template='users/email/forgot_username.ltxt', html_template='users/email/forgot_username.html', use_https=False, request=None):

    user = self.user
    current_site = get_current_site(request)
    site_name = current_site.name
    domain = current_site.domain
    @email_utils.safe_translation
    def _send_mail(locale, user, context):
        subject = (_('Your    username    on    %s') % site_name)
        mail = email_utils.make_mail(subject=subject, text_template=text_template, html_template=html_template, context_vars=context, from_email=settings.TIDINGS_FROM_ADDRESS, to_email=user.email)
        email_utils.send_messages([mail])
    c = {'email': user.email, 'domain': domain, 'login_url': reverse('users.login'), 'site_name': site_name, 'username': user.username, 'protocol': ((use_https and 'https') or 'http')}
    locale = (user.profile.locale or settings.WIKI_DEFAULT_LANGUAGE)
    _send_mail(locale, user, c)
