Jake B.
Well-known member
I am trying to extend XenForo_Permission, more specifically the 'hasPermission' function in it, however it does not seem to be working, What I have is below:
Permission.php:
So the page shouldn't load after the first time a permission is checked, though it does not seem to be working. I was just wondering if for some reason it is not possible to extend this class, as I do not have issues with any of the other classes being extended in the same manner using the same loadClass function. Help would be greatly appreciated.
Also, my code loadClass function is similar to the following:
If this is not possible, do you happen to have any idea of how to extend this functionality?
Permission.php:
Code:
<?php
class XXX_Permission extends XFCP_XXX_Permission
{
public static function hasPermission(array $permissions, $group, $permission)
{
die;
}
}
So the page shouldn't load after the first time a permission is checked, though it does not seem to be working. I was just wondering if for some reason it is not possible to extend this class, as I do not have issues with any of the other classes being extended in the same manner using the same loadClass function. Help would be greatly appreciated.
Also, my code loadClass function is similar to the following:
Code:
public static function loadClass($class, array &$extend)
{
switch ($class)
{
case 'XenForo_Permission':
$extend[] = 'XXX_Permission';
break;}
}
If this is not possible, do you happen to have any idea of how to extend this functionality?