function user_get_authmaps

Same name and namespace in other branches
  1. 6.x drupal-6.x/modules/user/user.module \user_get_authmaps()

Discover which external authentication module(s) authenticated a username.

Parameters

$authname: A username used by an external authentication module.

Return value

An associative array with module as key and username as value.

1 call to user_get_authmaps()
UserAuthmapAssignmentTestCase::testAuthmapAssignment in drupal-7.x/modules/user/user.test
Test authmap assignment and retrieval.

Archivo

drupal-7.x/modules/user/user.module, line 2027
Enables the user registration and login system.

Código

function user_get_authmaps($authname = NULL) {
  $authmaps = db_query("SELECT module, authname FROM {authmap} WHERE authname = :authname", array(':authname' => $authname))->fetchAllKeyed();
  return count($authmaps) ? $authmaps : 0;
}