user_get_authmaps

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/user/user.module, строка 1194

Версии
5 – 6
user_get_authmaps($authname = NULL)

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

Параметры

$authname A username used by an external authentication module.

Возвращаемое значение

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

Код

<?php
function user_get_authmaps($authname = NULL) {
  $result = db_query("SELECT authname, module FROM {authmap} WHERE authname = '%s'", $authname);
  $authmaps = array();
  $has_rows = FALSE;
  while ($authmap = db_fetch_object($result)) {
    $authmaps[$authmap->module] = $authmap->authname;
    $has_rows = TRUE;
  }
  return $has_rows ? $authmaps : 0;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему