@receiver(USER_FIELD_CHANGED)
def email_marketing_user_field_changed(sender, user=None, table=None, setting=None, old_value=None, new_value=None, **kwargs):
 if user.is_anonymous():
  return
 if ((table != 'auth_user') and (table != 'auth_userprofile')):
  return
 if (setting in CHANGED_FIELDNAMES):
  email_config = EmailMarketingConfiguration.current()
  if (not email_config.enabled):
   return
  update_user.delay(_create_sailthru_user_vars(user, user.profile), user.email, site=_get_current_site(), new_user=False, activation=((setting == 'is_active') and (new_value is True)))
 elif (setting == 'email'):
  email_config = EmailMarketingConfiguration.current()
  if (not email_config.enabled):
   return
  update_user_email.delay(user.email, old_value)

@ receiver ( USER_FIELD_CHANGED ) def email_marketing_user_field_changed ( sender , user = None , table = None , setting = None , old_value = None , new_value = None , ** kwargs ) : if user . is_anonymous ( ) : return if ( ( table != 'auth_user' ) and ( table != 'auth_userprofile' ) ) : return if ( setting in CHANGED_FIELDNAMES ) : email_config = EmailMarketingConfiguration . current ( ) if ( not email_config . enabled ) : return update_user . delay ( _create_sailthru_user_vars ( user , user . profile ) , user . email , site = _get_current_site ( ) , new_user = False , activation = ( ( setting == 'is_active' ) and ( new_value is True ) ) ) elif ( setting == 'email' ) : email_config = EmailMarketingConfiguration . current ( ) if ( not email_config . enabled ) : return update_user_email . delay ( user . email , old_value )
update a single user/profile field args: sender: not used user: the user object for the user being changed table: the name of the table being updated setting: the name of the setting being updated old_value: prior value new_value: new value kwargs: not used .