Вы можете использовать ' Настройки видимости блока PHP ', чтобы добиться того, что вы хотите здесь. Используя PHP, вы можете запрашивать базу данных и проверять, является ли зарегистрированный пользователь тем же пользователем, который создал узел в органической группе.
На * drupal.org уже есть пример , который я адаптировал (вам, вероятно, потребуется настроить его дальше) -
<?php
// check og module exists
if (module_exists('og')){
// check user is logged in
global $user;
if ($user->uid) {
// check we've got a group, rights to view the group,
// and of type "group_type" - change this to whichever group you want to restrict the block to
// or remove the condition entirely
if (($group = og_get_group_context()) && node_access('view', $group) && ($group->type == 'group_type') ) {
// check current user is a team admin as they should get access
if (og_is_node_admin($group)) {
return TRUE;
}
// check to see if the current user is the node author
if (arg(0) == 'node' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array('nid' => $nid));
if ($node->uid == $user->uid) {
return TRUE;
}
}
}
}
}
return FALSE;
?>