Basically, I want to do the exact same thing as this example: http://drupal.org/node/435726, except that I would like a list of the emails of og group members. Is it possible to accomplish this?

If not, how could one go about modifying token_custom to make it og aware?

Comments

hanoii’s picture

Status: Active » Fixed

Custom tokens let you use PHP, and by doing so, you can really do mostly anything, including accessing OG data. I am not familiar with OG that much to advice you on the PHP snippet, but It should be possible.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

westie’s picture

I managed to get this working by following this documentation: http://drupal.org/node/141522


$groups = $user->og_groups;
if($groups){
    foreach($groups as $group){
    echo "<li>";
        print l($group[title], 'node/'.$group[nid]);
    echo "</li>";
    }
}
else {
    echo "<li>$user->name has joined no groups</li>";
}

Just put it as a user type.