You are here

class ogGroupUserAction in Organic groups 7.2

Same name and namespace in other branches
  1. 7 scripts/generate-og-d6-content.php \ogGroupUserAction

A group with multiple members.

Hierarchy

Expanded class hierarchy of ogGroupUserAction

File

scripts/generate-og-d6-content.php, line 236

View source
class ogGroupUserAction implements ogContent {
  public function groupList($user_ids) {
    $list = array();
    $list[] = array(
      'title' => 'group-with-user-action',
      'uid' => $user_ids[3],
      'body' => 'group with user action',
      'og_description' => 'description with user action.',
    );
    return $list;
  }
  public function postList($user_ids, $groups) {
    return array();
  }
  public function groupActions($user_ids, $groups, $posts) {
    $gid = $groups[0];

    // - user ID 4 as pending member.
    og_save_subscription($gid, $user_ids[4], array(
      'is_active' => 0,
    ));

    // - user ID 5 as active member.
    og_save_subscription($gid, $user_ids[5], array(
      'is_active' => 1,
    ));

    // - user ID 6 as pending admin member.
    og_save_subscription($gid, $user_ids[6], array(
      'is_active' => 0,
      'is_admin' => 1,
    ));

    // - user ID 7 as active admin member.
    og_save_subscription($gid, $user_ids[7], array(
      'is_active' => 1,
      'is_admin' => 1,
    ));
  }

}

Members