You are here

function hybridauth_report in HybridAuth Social Login 6.2

Same name and namespace in other branches
  1. 7.2 hybridauth.admin.inc \hybridauth_report()
1 string reference to 'hybridauth_report'
hybridauth_menu in ./hybridauth.module
Implements hook_menu().

File

./hybridauth.admin.inc, line 521
Administrative pages forms and functions for the HybridAuth module.

Code

function hybridauth_report() {
  $providers = hybridauth_providers_list();
  $header = array(
    t('Authentication provider'),
    t('Users count'),
  );
  $rows = array();
  $results = db_query('SELECT provider, COUNT(provider_identifier) count FROM {hybridauth_identity} GROUP BY provider');
  while ($result = db_fetch_array($results)) {
    $rows[] = array(
      $providers[$result['provider']],
      $result['count'],
    );
  }
  $form = array();
  $form['report'] = array(
    '#value' => theme('table', $header, $rows),
  );
  return $form;
}