def METHOD_NAME(user, group_dict=None, role=None):
    create_reset_key(user)
    body = get_invite_body(user, group_dict, role)
    extra_vars = {
        'site_title': config.get('ckan.site_title')
    }
    subject = render('emails/invite_user_subject.txt', extra_vars)
    # Make sure we only use the first line
    subject = subject.split('\n')[0]
    mail_user(user, subject, body)