HQCoder
Member
Hello Everyone,
in my xf1 addon i get current user permissions with the code
please tell me how to get it in xf2
in my xf1 addon i get current user permissions with the code
PHP:
$currentUserId = XenForo_Visitor::getInstance()->getUserId();
$currentUser = $this->_getUserModel()->getUserById($currentUserId, array(
'join' => XenForo_Model_User::FETCH_USER_PERMISSIONS
));
$currentUser['permissions'] = XenForo_Permission::unserializePermissions($currentUser['global_permission_cache']);
please tell me how to get it in xf2
Last edited: