2
I've found solution on my own so i would like to share it with others:
in file rmdp_functions.php (subfolder > include)
i have added code found somewhere on forum:
function rmdp_in_group($group_name) {
global $xoopsUser;
if (!is_object($xoopsUser)) {
return false;
}
$member_handler =& xoops_gethandler('member');
$groups =& $member_handler->getGroupsByUser($xoopsUser->getVar('uid'), true);
$in_group = false;
foreach ($groups as $group) {
if ($group->getVar('name') == $group_name) {
$in_group = true;
break;
}
}
return $in_group;
}
then in file categos.php - which shows category content i have changed code like this from line 42:
include('include/rmdp_functions.php');
$xoopsTpl->assign('rss_catego',$id);
// Comprobamos el acceso a la categorÃa
include 'include/rmdp_access.php';
if (rmdp_check_access($id)){
// array of IDs of groups to which current user belongs
if (!rmdp_in_group("Approved members")) {
redirect_header(XOOPS_URL."/user.php?xoops_redirect=".parse_url($_SERVER['PHP_SELF']), 1, _RMDP_ERR_ACCESS);
die();}
}
later in code there is line with>
include('include/rmdp_functions.php'); should be removed.
I needed to use Approved members string to indentify user group with that name, probably others gonna use something else...
i hope that i helped someone!