5.x
Neil Drumm 2007-08-14 06:50:41 +00:00
parent a52ca1ab00
commit 47bc80c02f
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,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 (is_array($account->roles) && !isset($perm[$account->uid])) {
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] = '';