function simple_fb_connect_get_return_url in Simple FB Connect 7.2
Creates the return URL that works with and without clean URLs.
Return value
return URL for FacebookRedirectLoginHelper.
2 calls to simple_fb_connect_get_return_url()
- simple_fb_connect_redirect_to_fb in ./
simple_fb_connect.module - Page callback for /user/simple-fb-connect.
- 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 1011 - Simple Facebook Login Module for Drupal Sites.
Code
function simple_fb_connect_get_return_url() {
// Generate the URL where FB will return the user after authentication.
$return_url = url('user/simple-fb-connect/return', array(
'absolute' => TRUE,
));
// If clean URLs is disabled, we need to encode slashes in the query string.
$query_pos = strpos($return_url, '?');
if ($query_pos !== FALSE) {
$url_string = substr($return_url, 0, $query_pos);
$query_string = substr($return_url, $query_pos);
$return_url = $url_string . str_replace('/', '%2F', $query_string);
}
return $return_url;
}