function hybridauth_window_start in HybridAuth Social Login 7.2
Same name and namespace in other branches
- 6.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 72 - HybridAuth module pages.
Code
function hybridauth_window_start($provider_id) {
// If provider is OpenID, but we don't have the openid_identifier.
if ($provider_id == 'OpenID' && !isset($_GET['openid_identifier'])) {
$form = drupal_get_form('hybridauth_openid_form');
return _hybridauth_window_render_form($form, $provider_id);
}
// Make sure the session is started, HybridAuth library needs it.
hybridauth_session_start();
// Try to get HybridAuth instance.
if ($hybridauth = hybridauth_get_instance()) {
return _hybridauth_window_auth($hybridauth, $provider_id);
}
else {
drupal_set_message(t('There was an error processing your request.'), 'error');
_hybridauth_window_close(FALSE);
}
}