unsubscribe_user.naml

 <macro name="unsubscribe_user" requires="servlet">
     <n.node_page.>
         <n.set_local_user.get_user_from_id user_id="[n.get_parameter name='user'/]" />
         <n.set_local_subscription.page_node.subscription_for email="[n.local_user.user_email/]" />
        <n.if.is_submitted_form>
            <then>
                <n.if.equal value1="remove-subscription" value2="[n.action_parameter/]">
                    <then>
                        <n.if.local_subscription.is_subscribed>
                            <then.local_subscription.remove/>
                        </n.if.local_subscription.is_subscribed>
                        <n.redirect_to.subscription_removed_user_url/>
                    </then>
                </n.if.equal>
            </then>
        </n.if.is_submitted_form>
        <n.html>
             <head>
                <n.title.><t>Unsubscribe</t></n.title.>
                <n.main_title_css/>
            </head>
            <body>
                <n.local_user.profile_header/>
                <br/> 
                <div class="shaded-bg-color rounded second-font main-title">
                    <t>Remove Subscription</t>
                </div>
                <div style="font-weight:bold;margin: 2em 0 1em">
                    <t>Do you really want to unsubscribe this user from <t.location><a href="[n.page_node.url/]"><n.page_node.subject/></a></t.location>?</t>
                </div>
    
                <n.unsubscription_form/>
            </body> 
        </n.html>
    </n.node_page.>
</macro> 

<macro name="unsubscribe_user_path" requires="node">
    <n.set_local_user.get_user_from_id user_id="[n.get_parameter name='user'/]" />
    /template/NamlServlet.jtp?macro=unsubscribe_user&node=<n.id/>&user=<n.local_user.id/>
</macro>