summaryrefslogtreecommitdiff
path: root/modules/user
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user')
-rw-r--r--modules/user/user.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 1e30d6f41..68fcc0b4c 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -307,15 +307,15 @@ function user_access($string, $account = NULL) {
global $user;
static $perm = array();
+ if (is_null($account)) {
+ $account = $user;
+ }
+
// User #1 has all privileges:
if ($user->uid == 1) {
return 1;
}
- if (is_null($account)) {
- $account = $user;
- }
-
// To reduce the number of SQL queries, we cache the user's permissions
// in a static variable.
if (!isset($perm[$account->uid])) {