summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-03-17 02:07:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-03-17 02:07:42 +0000
commitaae42b23b7ec42adbdabd84bf13e4e770f17ea8d (patch)
treea0963f267bfba48f85ebb3de32134942b954ae6d /modules/user/user.module
parent25c18d5dd04878afde8150d57099bdcb8933f1e5 (diff)
downloadbrdo-aae42b23b7ec42adbdabd84bf13e4e770f17ea8d.tar.gz
brdo-aae42b23b7ec42adbdabd84bf13e4e770f17ea8d.tar.bz2
#347250 follow-up by c960657: Fix OpenID failure introduced by user_load_multiple().
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index baed78ae9..91a189e2c 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -110,10 +110,10 @@ function user_field_build_modes($obj_type) {
}
function user_external_load($authname) {
- $result = db_query("SELECT uid FROM {authmap} WHERE authname = '%s'", $authname);
+ $uid = db_query("SELECT uid FROM {authmap} WHERE authname = :authname", array(':authname' => $authname))->fetchField();
- if ($user = db_fetch_array($result)) {
- return user_load($user);
+ if ($uid) {
+ return user_load($uid);
}
else {
return FALSE;