function _fb_logout in Drupal for Facebook 6.3
Same name and namespace in other branches
- 7.3 fb.module \_fb_logout()
Helper to ensure local user is logged out, or an anonymous session is refreshed.
3 calls to _fb_logout()
- fb_ajax_event in ./
fb.module - Ajax callback handles an event from facebook's javascript sdk.
- fb_user_fb in ./
fb_user.module - Implementation of hook_fb.
- _fb_user_external_login in ./
fb_user.module - If facebook user has authorized app, and account map exists, login as the local user.
File
- ./
fb.module, line 898 - This is the core required module of Drupal for Facebook.
Code
function _fb_logout() {
if (session_name()) {
// Avoid PHP warning.
session_start();
// Make sure there is a session before destroy.
session_destroy();
// Fix for http://bugs.php.net/bug.php?id=32330
session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write', 'sess_destroy_sid', 'sess_gc');
$GLOBALS['user'] = drupal_anonymous_user();
}
}