function user_get_authmaps

user_get_authmaps($authname = NULL)

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.

File

modules/user/user.module, line 2059
Enables the user registration and login system.

Code

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/function/user_get_authmaps/7.x