Integrated with GnuBoard using the WordPress member database, enabling users to log in and write posts on the board.
- Subdomain and cookie sharing
- Save the following source code as «wp-sso.php» on the server where WordPress is installed
[PHP] include 'wp-load.php'; $cookie_name = 'wordpress_logged_in_'.md5(get_site_option('siteurl')); $cookie = $_COOKIE[$cookie_name]; wp_set_current_user(wp_validate_auth_cookie($cookie, 'logged_in')); if($user = wp_get_current_user()) { echo '‘.$user->user_login.’ ‘;
//echo ‘‘.$user->user_nicename.’ ‘;
echo ‘‘.$user->display_name.’ ‘;
echo ‘‘.$user->user_email.’ ‘;
echo ‘‘.$user->user_url.’ ‘;
}
?>[/PHP] - If there is no GnuBoard session value but a WordPress cookie value exists, process module 2 on the server to implement SSO(Single Sign On) functionality
- If there is a GnuBoard session value but no WordPress cookie value, clear the session and refresh the page
- Resize the page when the GnuBoard page load event occurs


안녕하세요.. SIR에서 온 전진입니다.
혹시 나머지 코드를 볼 수 있을까해서요.. ^^
부탁드립니다.
급하게 정리하여 올렸습니다 ^^
http://kilho.net/archives/mypost/786