function simple_fb_connect_go_to_redirect_url in Simple FB Connect 7.2
Redirects user after Facebook login to the desired Drupal path.
The input parameter might contain a query parameter. This function will parse the URL and handle the query parameters correctly.
Other modules can modify the destination URL by implementing hook_simple_fb_connect_redirect_url().
Parameters
string $post_login_url: Post login URL.
$account: Drupal user that was logged in via Simple FB Connect.
1 call to simple_fb_connect_go_to_redirect_url()
- simple_fb_connect_return_from_fb in ./
simple_fb_connect.module - Page callback for /user/simple-fb-connect/return.
File
- ./
simple_fb_connect.module, line 991 - Simple Facebook Login Module for Drupal Sites.
Code
function simple_fb_connect_go_to_redirect_url($post_login_url, $account) {
// Extract URL parts and use them to define the post login URL.
$url_parts = drupal_parse_url($post_login_url);
$path = $url_parts['path'];
$options = array(
'query' => $url_parts['query'],
);
// Allow other modules to modify the destination URL.
if (count(module_implements('simple_fb_connect_redirect_url')) > 0) {
list($path, $options) = module_invoke_all('simple_fb_connect_redirect_url', $path, $options, $account);
}
drupal_goto($path, $options);
}