You are here

function spaces_og_wrapper in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces.module \spaces_og_wrapper()

Spaces OG wrapper

1 string reference to 'spaces_og_wrapper'
spaces_og_menu in ./spaces_og.module
Implementation of hook_menu().

File

./spaces_og.module, line 725

Code

function spaces_og_wrapper($op) {
  switch ($op) {
    case 'member-list':
      if ($space = spaces_get_space()) {
        if (og_is_node_admin(node_load($space->sid)) && user_access('ucreate users')) {
          $links = context_get('spaces', 'links');
          $links = $links ? $links : array();
          $links['ucreate'] = array(
            'title' => t('Member'),
            'href' => 'member-add',
          );
          context_set('spaces', 'links', $links);
        }
        return og_menu_check('og_list_users_page', $space->sid);
      }
    case 'member-add':
      if (module_exists('ucreate')) {
        $form = drupal_get_form('ucreate_user_form');
        context_set('spaces', false);
      }
      return $form;
  }
}