diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-23 08:06:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-23 08:06:43 +0000 |
commit | bc9cbefa307cac21cb276ff94bb615db5c80e743 (patch) | |
tree | 2fba93fdba5b7eec649bcb8adcd343fff3732f3a /modules | |
parent | 1766d40093abf386a868949d9ae2de44fae21dbf (diff) | |
download | brdo-bc9cbefa307cac21cb276ff94bb615db5c80e743.tar.gz brdo-bc9cbefa307cac21cb276ff94bb615db5c80e743.tar.bz2 |
- Patch #45729 by markus, jvandyk, moshe: fixed problem with permission checking.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user.module | 2 | ||||
-rw-r--r-- | modules/user/user.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/user.module b/modules/user.module index 12405d285..0a9d131e6 100644 --- a/modules/user.module +++ b/modules/user.module @@ -337,7 +337,7 @@ function user_access($string, $account = NULL) { // To reduce the number of SQL queries, we cache the user's permissions // in a static variable. - if (!isset($perm[$account->uid]) && count($user->roles)) { + if (!isset($perm[$account->uid])) { $result = db_query("SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN (%s)", implode(',', array_keys($account->roles))); $perm[$account->uid] = ''; diff --git a/modules/user/user.module b/modules/user/user.module index 12405d285..0a9d131e6 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -337,7 +337,7 @@ function user_access($string, $account = NULL) { // To reduce the number of SQL queries, we cache the user's permissions // in a static variable. - if (!isset($perm[$account->uid]) && count($user->roles)) { + if (!isset($perm[$account->uid])) { $result = db_query("SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN (%s)", implode(',', array_keys($account->roles))); $perm[$account->uid] = ''; |