dbembibre
Active member
I trying to validate in a listener class if the user is array in this case i inject a special template.
When i get $template->getParams() i can see via print_r all values, but no cant acces to it.
Whats the problem ??
I see in print_r($params)
[is_admin] => 1
[username] => Danny
But when i asign to a vars they dont have any value.
Anyone can help me please.
Thanks in advance
When i get $template->getParams() i can see via print_r all values, but no cant acces to it.
Whats the problem ??
I see in print_r($params)
[is_admin] => 1
[username] => Danny
But when i asign to a vars they dont have any value.
PHP:
<?php
class microstats_Listener
{
public static function template_hook ($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
{
if ($hookName == 'footer_links_legal')
{
$params = $template->getParams();
print_r($params);
$isAdmin = $params ['is_admin'];
$AdminName = $params['username'];
Anyone can help me please.
Thanks in advance