def METHOD_NAME(event):
    request = event.request
    settings = request.registry.settings
    if not settings.get("account_validation", False):
        return
    for impacted_object in event.impacted_objects:
        account = impacted_object["new"]
        user_email = account["id"]
        activation_key = get_cached_validation_key(user_email, request.registry)
        if activation_key is None:
            continue
        # Send an email to the user with the link to activate their account.
        Emailer(request, account).send_activation(activation_key)