Gnuboard linked completion
Based on the WordPress member DB, it was linked with Gnuboard to make it possible to write when logging in from BBS.
- Sharing cookies with sub domain
- Save the source below as “wp-sso.php” on the server where the 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 WordPress cookie value, module 2 is processed on the server to implement SSO (SINGLE SIGN ON) function
- If you have a gnuboard session value and the WordPress cookie value, you can empty the session and gangcy the page
- The page restriction of the page when the Gnuboard page loading event occurs
Comments (2)
안녕하세요.. SIR에서 온 전진입니다.
혹시 나머지 코드를 볼 수 있을까해서요.. ^^
부탁드립니다.
급하게 정리하여 올렸습니다 ^^
http://kilho.net/archives/mypost/786