Вопрос

I want show in profile page the lists of organic groups that current user is a member. By default if i call <?php print render($user_profile); ?> on my result i have one field with the list of my groups membership. But I can not intercept the function or variable that generates this result. How i can obtain this with drupal 7? thanks in advance!

Это было полезно?

Решение 2

I found the direct access for this

<?php print render ($user_profile['og_user_node']); ?>

Or we can also create a simple view block for profile page..the og module already provides these views by default.

Другие советы

You can use og_get_groups_by_user function to get group of current user.

$groups = og_get_groups_by_user($account);

This will return group IDs of all the groups this user is an approved member of.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top