diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-18 20:03:19 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-18 20:03:19 +0000 |
commit | 8971add8493d49ed0e170a2521a62f2f0f39137c (patch) | |
tree | d22f43ae4213b84c1089e7c12aa31c9220e77dd3 /modules/user/user.module | |
parent | 5d31f59573b8a559b06842b7f90cc2bd588025a2 (diff) | |
download | brdo-8971add8493d49ed0e170a2521a62f2f0f39137c.tar.gz brdo-8971add8493d49ed0e170a2521a62f2f0f39137c.tar.bz2 |
#163191 follow up patch by hswong3i and pwolanin: use a has_rows flag where we dont need a counter
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 56f0419b3..fdce324ab 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1098,12 +1098,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; + $has_rows = FALSE; while ($authmap = db_fetch_object($result)) { $authmaps[$authmap->module] = $authmap->authname; - $num_rows++; + $has_rows = TRUE; } - return $num_rows > 0 ? $authmaps : 0; + return $has_rows ? $authmaps : 0; } function user_set_authmaps($account, $authmaps) { |