def record_affiliate_registration_attribution(request, user):
 affiliate_id = request.COOKIES.get(settings.AFFILIATE_COOKIE_NAME)
 if (user and affiliate_id):
  UserAttribute.set_user_attribute(user, REGISTRATION_AFFILIATE_ID, affiliate_id)

def record_affiliate_registration_attribution ( request , user ) : affiliate_id = request . COOKIES . get ( settings . AFFILIATE_COOKIE_NAME ) if ( user and affiliate_id ) : UserAttribute . set_user_attribute ( user , REGISTRATION_AFFILIATE_ID , affiliate_id )
attribute this users registration to the referring affiliate .