summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/user.module2
-rw-r--r--modules/user/user.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/user.module b/modules/user.module
index 87afd06c4..f5b42d91d 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -215,7 +215,7 @@ function user_access($string) {
** in a static variable.
*/
- if (isset($perm)) {
+ if (!$perm) {
if ($user->uid) {
$perm = db_result(db_query("SELECT p.perm FROM role r, permission p WHERE r.rid = p.rid AND name = '%s'", $user->role), 0);
}
diff --git a/modules/user/user.module b/modules/user/user.module
index 87afd06c4..f5b42d91d 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -215,7 +215,7 @@ function user_access($string) {
** in a static variable.
*/
- if (isset($perm)) {
+ if (!$perm) {
if ($user->uid) {
$perm = db_result(db_query("SELECT p.perm FROM role r, permission p WHERE r.rid = p.rid AND name = '%s'", $user->role), 0);
}