title: How Django-allauth signal/adapter flow works ?
body: <p>I have implemented Django-allauth using Facebook as a social account provider as it gives lots of information about its users.
  Below is my custom signup form:</p>
  
  <blockquote>
    <p>ACCOUNT_SIGNUP_FORM_CLASS = 'profiles.forms.MySignupForm'</p>
  </blockquote>
  
  <pre><code>class MySignupForm(forms.ModelForm):
  class Meta:
      model = get_user_model()
      fields = ['email', 'first_name', 'last_name']
  
  def __init__(self, *args, **kwargs):
      super(MySignupForm, self).__init__(*args, **kwargs)
      self.helper = FormHelper()
      self.fields["email"].widget.input_type = "email"  # ugly hack
      self.helper.form_method = "POST"
      self.helper.form_action = "account_signup"
      self.helper.form_id = "signup_form"
      self.helper.form_class = "signup"
      self.helper.layout = Layout(
          Field('email', placeholder="Enter Email", autofocus=""),
          Field('first_name', placeholder="Enter First Name"),
          Field('last_name', placeholder="Enter Last Name"),
          Field('password1', placeholder="Enter Password"),
          Field('password2', placeholder="Re-enter Password"),
          Submit('sign_up', 'Sign up', css_class="btn-warning"),
      )
  
  def signup(self, request, user):
      user.first_name = self.cleaned_data['first_name']
      user.last_name = self.cleaned_data['last_name']
      user.email = self.cleaned_data['email']
      user.save()
  
  *What else can be added here in signup form ???  or to do the processing on received input i need to write adapter ??*
  </code></pre>
  
  <p>I have below signal receiver implemented.</p>
  
  <pre><code>@receiver(user_signed_up)
  def set_initial_user_names(request, user, sociallogin=None, **kwargs):
       if sociallogin:
          ***grab the data***
          email_verified = sociallogin.account.extra_data['verified']
          profile = models.Profile(user=user, avatar_url=picture_url, email_verified=email_verified)
          profile.save() &lt;--- *saving custom user profile here*
          from allauth.account.models import EmailAddress
          emails = EmailAddress.objects.filter(user=user, email=user.email)
          for email in emails:
              email.verified = email_verified
              email.save()  &lt;--- *saving allauth Email Address instance.* 
          user.guess_display_name()
          user.save() &lt;----- *saving custom user model based on email address.*
  </code></pre>
  
  <p>Now if you see i am verifying if email is verified by social account(Facebook) if so i am updating Email Address instance of allauth.</p>
  
  <p>But it happens twice. 
  allauth already updates the email address instance (account_emailaddress) during the login/sign up process. So database is getting hit twice for account_emailaddress table.</p>
  
  <p>I want to control this scenario myself so that it only does it once..<br>
  Answer is Adapter, but if i write adapter, what happens to the signal receiver ??<br>
  Can someone tell me the adapter/signal flow ??    how it should be implemented. ?? 
  I have gone through the documentation but still it would be nice if i get some direction on the flow like at which stage what i can control !!</p>