function smarty_block_registered($params, $content, &$template, &$repeat)
{
    if ($content && AppUser::isLoggedIn()) {
        if (isset($params['can'])) {
            return AppUser::can($params['can']) ? $content : '';
        }
        return $content;
    } else {
        return '';
    }
}
function smarty_function_user_name($params, $template)
{
    return htmlentities(\BlankCanvas\AppUser::get('name'));
}
function smarty_block_guest($params, $content, $template, &$repeat)
{
    if ($content) {
        return AppUser::isLoggedIn() ? '' : $content;
    }
}