From 174f6e392394ce512f18f7bae6963487a45af034 Mon Sep 17 00:00:00 2001
From: Bradley M. Froehle <bfroehle@math.berkeley.edu>
Date: Thu, 28 Oct 2010 01:33:23 -0700
Subject: [PATCH] user_get_authmaps: respect proper key-value ordering as in description

The description for this function describes
user_get_authmaps($authname) as returning arrays
like 'cas' => '315753' where cas is the module.

The current code returns the key values pairs in
the reverse order.
---
 modules/user/user.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git modules/user/user.module modules/user/user.module
index c0372e6..4773644 100644
--- modules/user/user.module
+++ modules/user/user.module
@@ -1933,7 +1933,7 @@ function user_page_title($account) {
  *   An associative array with module as key and username as value.
  */
 function user_get_authmaps($authname = NULL) {
-  $authmaps = db_query("SELECT authname, module FROM {authmap} WHERE authname = :authname", array(':authname' => $authname))->fetchAllKeyed();
+  $authmaps = db_query("SELECT module, authname FROM {authmap} WHERE authname = :authname", array(':authname' => $authname))->fetchAllKeyed();
   return count($authmaps) ? $authmaps : 0;
 }
 
-- 
1.7.3.1

