Integration with Gnuboard Completed
Based on the WordPress member database, we have integrated it with Gnuboard to allow users to write posts upon logging in to 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 and a WordPress cookie value exists, the server processes module 2 to implement SSO (Single Sign On) functionality.
- If there is a Gnuboard session value and no WordPress cookie value, clear the session and refresh the page.
- When a Gnuboard page loading event occurs, resize the page accordingly.











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