function hybridauth_window_start in HybridAuth Social Login 6.2
Same name and namespace in other branches
- 7.2 hybridauth.pages.inc \hybridauth_window_start()
1 string reference to 'hybridauth_window_start'
- hybridauth_menu in ./
hybridauth.module - Implements hook_menu().
File
- ./
hybridauth.pages.inc, line 40
Code
function hybridauth_window_start($provider_id) {
// If provider is OpenID, but we don't have the OpenID target, show OpenID form.
if ($provider_id == 'OpenID' && !isset($_GET['openid_identifier'])) {
$form = drupal_get_form('hybridauth_openid_form');
// theme('page', $content, $show_blocks, $show_messages)
print theme('page', $form, FALSE, TRUE);
exit;
}
// Make sure the session is started, HybridAuth library needs it.
// This is needed only for Pressflow that has drupal_session_start() function.
if (function_exists('drupal_session_start')) {
drupal_session_start();
}
// Try to get HybridAuth instance.
if ($hybridauth = hybridauth_get_instance()) {
_hybridauth_window_auth($hybridauth, $provider_id);
}
else {
drupal_set_message(t('There was an error processing your request.'), 'error');
_hybridauth_window_close(FALSE);
}
}