user_get_authmaps

Versions
4.6 – 7
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.

Code

modules/user/user.module, line 1653

<?php
function user_get_authmaps($authname = NULL) {
  $authmaps = db_query("SELECT authname, module FROM {authmap} WHERE authname = :authname", array(':authname' => $authname))->fetchAllKeyed();
  return count($authmaps) ? $authmaps : 0;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.