function hybridauth_get_providers in HybridAuth Social Login 7
5 calls to hybridauth_get_providers()
- hybridauth_admin_settings in ./hybridauth.admin.inc
- hybridauth_get_config in ./hybridauth.auth.inc
- hybridauth_get_enabled_providers in ./hybridauth.auth.inc
- hybridauth_get_provider_name in ./hybridauth.auth.inc
- hybridauth_uninstall in ./hybridauth.install
- Implements hook_uninstall().
File
- ./hybridauth.auth.inc, line 3
Code
function hybridauth_get_providers() {
$providers =& drupal_static(__FUNCTION__, NULL);
if (!isset($providers)) {
$raw_providers = array(
'OpenID' => 'OpenID',
'Facebook' => 'Facebook',
'Twitter' => 'Twitter',
'LinkedIn' => 'LinkedIn',
'MySpace' => 'MySpace',
'Google' => 'Google',
'Yahoo' => 'Yahoo',
'Foursquare' => 'Foursquare',
'AOL' => 'AOL',
'Live' => 'Windows Live',
);
$providers = array();
$weights = array();
foreach ($raw_providers as $provider_id => $provider_name) {
$weights[$provider_id] = variable_get('hybridauth_provider_' . $provider_id . '_weight', 0);
}
asort($weights);
foreach ($weights as $provider_id => $weight) {
$providers[$provider_id] = $raw_providers[$provider_id];
}
}
return $providers;
}