Walky
Member
Hi !
I would to display all users who have a permission But didn't get it
Route class code :
ControllerAdmin
Template test_permissions
Didn't display users who have the permissions (canViewPop)
Thanks
I would to display all users who have a permission But didn't get it
Route class code :
PHP:
<?php
class Test_Route_PrefixAdmin_Test implements XenForo_Route_Interface
{
public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
{
return $router->getRouteMatch('Test_ControllerAdmin_Test', $routePath);
}
}
ControllerAdmin
PHP:
<?php
class Test_ControllerAdmin_Test extends XenForo_ControllerAdmin_Abstract
{
public function actionIndex()
{
$visitor = XenForo_Visitor::getInstance();
$usersCanViewPop = $visitor->hasPermission('general', 'canViewPop');
$viewParams = array('usersCanViewPop' => $usersCanViewPop);
return $this->responseView('Test_ViewAdmin_Test', 'test_permissions', $viewParams);
}
}
Template test_permissions
HTML:
{$usersCanViewPop}
Didn't display users who have the permissions (canViewPop)
Thanks
Last edited: