You are here

function simple_fb_connect_save_post_login_url in Simple FB Connect 7.2

Saves post login URL to $_SESSION if it was explicitly defined.

1 call to simple_fb_connect_save_post_login_url()
simple_fb_connect_redirect_to_fb in ./simple_fb_connect.module
Page callback for /user/simple-fb-connect.

File

./simple_fb_connect.module, line 968
Simple Facebook Login Module for Drupal Sites.

Code

function simple_fb_connect_save_post_login_url() {
  $destination = drupal_get_destination();
  if (!url_is_external($destination['destination']) && $destination['destination'] != 'user/simple-fb-connect') {
    $_SESSION['simple_fb_connect']['post_login_url'] = $destination['destination'];

    // We need to unset the GET parameter so that the user will be redirected.
    unset($_GET['destination']);
  }
}