pub fn for_user<'reg, 'rc>(
    h: &Helper<'reg, 'rc>,
    r: &'reg Handlebars<'reg>,
    ctx: &'rc Context,
    rc: &mut RenderContext<'reg, 'rc>,
    out: &mut dyn Output
) -> HelperResult
Expand description

A templating helper that tests if current user’s username matches a given string.

Usage:

  1. {{#for_user "foo"}}..content..{{/for_user}}

    Renders content only if current user’s username is “foo”.

  2. {{#for_user "foo"}}{{else}}..content..{{/for_user}}

    Renders content only if current user’s username is NOT “foo”.