Post the output of id for the user running it. It works me:
$this->bbcode_second_pass_code('', '% vcgencmd
Usage: vcgencmd [-t] command
Send a command to the VideoCore and print the result.
-t Time how long the command takes to complete
-h, --help Show this information
Use the command 'vcgencmd commands' to get a list of available commands
Exit status:
0 command completed successfully
-1 problem with VCHI
-2 VideoCore returned an error
For further documentation please see
https://www.raspberrypi.org/documentation/computers/os.html#vcgencmd
')
$this->bbcode_second_pass_code('', '% id
uid=1000(facade) gid=100(users) groups=100(users),974(kodi),986(video),995(audio),998(wheel)')