function execute()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     $form = $form = $request->ACSGetParameters();
     // 対象となるコミュニティIDを取得
     $community_id = $request->ACSgetParameter('community_id');
     // コミュニティ情報
     $community_row = ACSCommunity::get_community_profile_row($community_id);
     // 承認が必要か
     $is_admission_required = ACSCommunity::is_admission_required_for_join_community($acs_user_info_row['user_community_id'], $community_id);
     // forward
     $done_obj = new ACSDone();
     $done_obj->set_message(ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M003'));
     $done_obj->add_link($community_row['community_name'] . ' ' . ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M004'), $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id']);
     if ($is_admission_required) {
         // コミュニティ参加承認待ち登録
         $waiting_id = ACSWaiting::set_waiting_for_join_community($community_id, $acs_user_info_row['user_community_id'], $form['message']);
         // 参加承認依頼通知メール
         ACSWaiting::send_admission_request_notify_mail($waiting_id);
         $done_obj->set_title(ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M001'));
     } else {
         // コミュニティメンバ登録
         $community_member_form = array();
         $community_member_form['community_id'] = $community_id;
         $community_member_form['user_community_id'] = $acs_user_info_row['user_community_id'];
         ACSCommunity::set_community_member($community_member_form);
         $done_obj->set_title(ACSMsg::get_msg('Community', 'JoinCommunityAction.class.php', 'M002'));
     }
     $request->setAttribute('done_obj', $done_obj);
     $controller->forward('Common', 'Done');
 }