summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-06-23 05:10:38 +0000
committerDries Buytaert <dries@buytaert.net>2005-06-23 05:10:38 +0000
commite7cc200eebf5cfc0a3f6db3c37d09b990c66c1cd (patch)
treeee6838ab7948159ac9da8ff1ce83605fb4210e8a
parent59af92c8eda84e3555be2081ae346d3b5149a60d (diff)
downloadbrdo-e7cc200eebf5cfc0a3f6db3c37d09b990c66c1cd.tar.gz
brdo-e7cc200eebf5cfc0a3f6db3c37d09b990c66c1cd.tar.bz2
- Patch by deekayen: roll back permission patch.
-rw-r--r--modules/user.module4
-rw-r--r--modules/user/user.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/user.module b/modules/user.module
index 34b605c59..05c8fd576 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -329,12 +329,12 @@ function user_access($string, $account = NULL) {
$result = db_query('SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $account->uid);
while ($row = db_fetch_object($result)) {
- $perm[$account->uid][] = $row->perm;
+ $perm[$account->uid] .= "$row->perm, ";
}
}
if (isset($perm[$account->uid])) {
- return in_array($string, $perm[$account->uid]);
+ return strstr($perm[$account->uid], "$string, ");
}
return FALSE;
diff --git a/modules/user/user.module b/modules/user/user.module
index 34b605c59..05c8fd576 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -329,12 +329,12 @@ function user_access($string, $account = NULL) {
$result = db_query('SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $account->uid);
while ($row = db_fetch_object($result)) {
- $perm[$account->uid][] = $row->perm;
+ $perm[$account->uid] .= "$row->perm, ";
}
}
if (isset($perm[$account->uid])) {
- return in_array($string, $perm[$account->uid]);
+ return strstr($perm[$account->uid], "$string, ");
}
return FALSE;