def profile_post_save(instance, sender, **kwargs):
 from django.contrib.auth.models import Group
 (anon_group, created) = Group.objects.get_or_create(name='anonymous')
 instance.groups.add(anon_group)
 if ((instance.email not in [u'', '', None]) and (not kwargs.get('raw', False))):
  (address, created) = EmailAddress.objects.get_or_create(user=instance, primary=True, defaults={'email': instance.email, 'verified': False})
  if (not created):
   EmailAddress.objects.filter(user=instance, primary=True).update(email=instance.email)

def profile_post_save ( instance , sender , ** kwargs ) : from django . contrib . auth . models import Group ( anon_group , created ) = Group . objects . get_or_create ( name = 'anonymous' ) instance . groups . add ( anon_group ) if ( ( instance . email not in [ u'' , '' , None ] ) and ( not kwargs . get ( 'raw' , False ) ) ) : ( address , created ) = EmailAddress . objects . get_or_create ( user = instance , primary = True , defaults = { 'email' : instance . email , 'verified' : False } ) if ( not created ) : EmailAddress . objects . filter ( user = instance , primary = True ) . update ( email = instance . email )
make sure the user belongs by default to the anonymous group .