diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user.module | 8 | ||||
-rw-r--r-- | modules/user/user.module | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/user.module b/modules/user.module index 1e30d6f41..68fcc0b4c 100644 --- a/modules/user.module +++ b/modules/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])) { 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])) { |