#718962 by add1sun, Pasqualle, jhodgdon: Fixed user_external_load() is undocumented.

merge-requests/26/head
Angie Byron 2010-05-05 07:10:06 +00:00
parent 08a07d7795
commit 108677607d
1 changed files with 9 additions and 0 deletions

View File

@ -187,6 +187,15 @@ function user_field_extra_fields() {
return $return;
}
/**
* Fetches a user object based on an external authentication source.
*
* @param string $authname
* The external authentication username.
*
* @return
* A fully-loaded user object if the user is found or FALSE if not found.
*/
function user_external_load($authname) {
$uid = db_query("SELECT uid FROM {authmap} WHERE authname = :authname", array(':authname' => $authname))->fetchField();