Index: user.module =================================================================== --- user.module (revision 111) +++ user.module (revision 112) @@ -307,15 +307,16 @@ global $user; static $perm = array(); - // User #1 has all privileges: - if ($user->uid == 1) { - return 1; - } if (is_null($account)) { $account = $user; } + // User #1 has all privileges: + if ($account->uid == 1) { + return 1; + } + // To reduce the number of SQL queries, we cache the user's permissions // in a static variable. if (!isset($perm[$account->uid])) {