You are here

function fb_sess_regenerate_hack in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 7.3 fb_session.inc \fb_sess_regenerate_hack()

When spoofing cookies, sess_regenerate causes problems when it changes the session id. Here we undo that change. Called from fb_user.module.

1 call to fb_sess_regenerate_hack()
_fb_user_external_login in ./fb_user.module
If facebook user has authorized app, and account map exists, login as the local user.
1 string reference to 'fb_sess_regenerate_hack'
_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_session.inc, line 61
This file is a replacement for Drupal's session.inc. Although not truly a replacement, as we include the default session.inc to do the heavy lifting.

Code

function fb_sess_regenerate_hack() {
  if (isset($GLOBALS['_fb_session_id'])) {
    $session_id = $GLOBALS['_fb_session_id'];
    db_query("UPDATE {sessions} SET sid = '%s' WHERE sid = '%s'", $session_id, session_id());
    session_id($session_id);
  }
}