X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=webapp%2Fmodules%2FUser%2Factions%2FCommunityListAction.class.php;fp=webapp%2Fmodules%2FUser%2Factions%2FCommunityListAction.class.php;h=6258b4723a2ca158757d536ea397da87724f9e36;hb=5b9f238c81808ea11bff12536ee867e3c3b7fc07;hp=0000000000000000000000000000000000000000;hpb=8f9121013e0e238a039705ba092ca08b5234d632;p=acs%2Facs.git diff --git a/webapp/modules/User/actions/CommunityListAction.class.php b/webapp/modules/User/actions/CommunityListAction.class.php new file mode 100644 index 0000000..6258b47 --- /dev/null +++ b/webapp/modules/User/actions/CommunityListAction.class.php @@ -0,0 +1,43 @@ +getContext(); + $controller = $context->getController(); + $request = $context->getRequest(); + $user = $context->getUser(); + + $acs_user_info_row = $user->getAttribute('acs_user_info_row'); + + // ÂоݤȤʤë¥æ¡¼¥¶¥³¥ß¥å¥Ë¥Æ¥£ID¤ò¼èÆÀ + $user_community_id = $request->ACSgetParameter('id'); + + // ¥æ¡¼¥¶¾ðÊó + $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id); + + // ¥Þ¥¤¥³¥ß¥å¥Ë¥Æ¥£ + $community_row_array = ACSUser::get_community_row_array($user_community_id); + + // ¥³¥ß¥å¥Ë¥Æ¥£Á´ÂΤθø³«ÈϰϤò¥»¥Ã¥È¤¹¤ë + foreach ($community_row_array as $index => $community_row) { + $community_row_array[$index]['contents_row_array']['self'] = ACSCommunity::get_contents_row($community_row['community_id'], ACSMsg::get_mst('contents_type_master','D00')); + $community_row_array[$index]['is_community_member'] = ACSCommunity::is_community_member($acs_user_info_row['user_community_id'], $community_row['community_id']); + } + + // set + $request->setAttribute('target_user_info_row', $target_user_info_row); + $request->setAttribute('community_row_array', $community_row_array); + + return View::SUCCESS; + } + + function isSecure () { + return false; + } +} + +?>