=== modified file 'modules/user/user.module'
--- modules/user/user.module	2009-02-09 07:36:15 +0000
+++ modules/user/user.module	2009-02-15 00:34:06 +0000
@@ -572,7 +572,7 @@ function user_role_permissions($roles = 
     if ($fetch) {
       // Get from the database permissions that were not in the static variable.
       // Only role IDs with at least one permission assigned will return rows.
-      $result = db_query("SELECT r.rid, p.permission FROM {role} r INNER JOIN {role_permission} p ON p.rid = r.rid WHERE r.rid IN (:fetch)", array(':fetch' => $fetch));
+      $result = db_query("SELECT rid, permission FROM {role_permission} WHERE rid IN (:fetch)", array(':fetch' => $fetch));
 
       while ($row = db_fetch_array($result)) {
         $stored_permissions[$row['rid']][$row['permission']] = TRUE;

