diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-08-12 16:12:00 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-08-12 16:12:00 +0000 |
commit | c17499b6fe5e9b388d09151d2c3525976fde065c (patch) | |
tree | 0203a1d7f6cbeba58fc2056ae4f6c6caa30119d0 /modules/user/user.module | |
parent | b134b023e11902ceae12f3ab861da1f0a2fdbdbd (diff) | |
download | brdo-c17499b6fe5e9b388d09151d2c3525976fde065c.tar.gz brdo-c17499b6fe5e9b388d09151d2c3525976fde065c.tar.bz2 |
- Patch #163191 by hswong3i: removed db_num_rows() for compatibility with Oracle and DB2. Also a performance improvement. (Correct version this time.)
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 9a3e1d863..5dbabe8aa 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1096,10 +1096,12 @@ function user_current_to_arg($arg) { function user_get_authmaps($authname = NULL) { $result = db_query("SELECT authname, module FROM {authmap} WHERE authname = '%s'", $authname); $authmaps = array(); + $num_rows = 0; while ($authmap = db_fetch_object($result)) { $authmaps[$authmap->module] = $authmap->authname; + $num_rows++; } - return count($authmaps) ? $authmaps : 0; + return $num_rows > 0 ? $authmaps : 0; } function user_set_authmaps($account, $authmaps) { |