[support] How can I tell if a user if a user is a member of an OG group?

Neil: esl-lounge.com neil at esl-lounge.com
Mon May 26 09:42:23 UTC 2008


I would like to show a link on a group node if a user is a member and another link if they are not. I looked through og.module and found the $subscription variable. I tried both the following without any success:

<?php if($subscription == 'active') : ?>
already a member!
<?php else: ?>
Join Today!
<?php endif; ?>

<?php if($subscription) : ?>
already a member!
<?php else: ?>
Join Today!
<?php endif; ?>

But I'm getting "Join Today" showing whether the user is a member or not. I imagine this means the $subscription variable isn't available in this context.

does anyone know how to find out if a user is a member of an OG group?

Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080526/7e708c2c/attachment.htm 


More information about the support mailing list