Getting the post author user_id in a custom bbcode with Callback

  • Thread starter Thread starter Lee
  • Start date Start date

Lee

Guest
Member
I have the following code:

PHP:

Code:

Code:
public static function renderChar(array $children, $option, array $tag, array $options, AbstractRenderer $renderer)
    {
        $output = trim($renderer->renderSubTree($children, $options));

        $charCode = \XF::visitor()->Profile->custom_fields->CharCode;

            return $renderer->wrapHtml(
            '<div style="color: ' . $charCode . '">',
            $output,
            '</div>'
        );
    }
I am looking to get the user entity...

Read more

Continue reading...
 
Top