<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'><p>The static <span style="font-weight: bold;">$perm</span> variable in <span style="font-weight: bold;">user_access()</span> contains the permissions that users have. When <code><span style="font-family: arial,helvetica,sans-serif;"><span style="font-weight: bold;">user_access('ClearCache', NULL, TRUE)</span> is executed, the static <span style="font-weight: bold;">$perm</span> value is emptied and re-filled with permissions from the current roles in the <span style="font-weight: bold;">$user</span> object. Theorectically, when <span style="font-weight: bold;">user_access()</span> is next called, assuming the $<span style="font-weight: bold;">user</span> object contains the same roles, the <span style="font-weight: bold;">$perm</span> variable should contain the same permissions which were cached in the first call. This is what happened in Drupal 5.x and the earlier versions of 6.x. This is NOT happening (at least consistently) in the most recent versions of the <span style="font-weight: bold;">user.module</span>.</span><br></code></p><p><code><br></code></p><p>I've written a bunch of debug code in the <span style="font-weight: bold;">user, node </span>and <span style="font-weight: bold;">ogur
</span>modules and now have more details. I am printing the output of
<span style="font-weight: bold;">user_access</span>() every time it is called.</p>
<p><br></p><p>When I issue:<br>
</p><div class="codeblock"><code>user_access('ClearCache', NULL, TRUE)</code></div><br>
Static <span style="font-weight: bold;">$perm</span> variable is cleared and re-filled with permissions from current <span style="font-weight: bold;">$user</span> object. This is correct.
<p><br></p><p>When <span style="font-weight: bold;">module_invoke</span>() is immediately executed next:<br>
</p><div class="codeblock"><code>module_invoke('node_content', 'access', 'create', 'story', $user)</code></div><br>
It will now make another call to <span style="font-weight: bold;">user_access()</span>:<br>
<div class="codeblock"><code>user_access('create story content', $user)</code></div><br>
The <span style="font-weight: bold;">$user</span> object still contains the same roles. The <span style="font-weight: bold;">$perm</span> variable now
contains values. This is correct. But the values in<span style="font-weight: bold;"> $perm</span> are NOT the same as those
inserted during the <span style="font-weight: bold;">ClearCache</span> call above! They have changed, and NOT
from the <span style="font-weight: bold;">user_access()</span> function (which I am monitoring)! So the question
is: Why has this <span style="font-weight: bold;">$perm</span> value changed?
<p><br></p><p>So far, I've found this behaviour occurs with OGUR when one of the following modules is installed:</p>
<ul><li>taxonomy_access</li><li>tac_lite</li><li>menu_breadcrumb</li><li>admin_menu</li></ul>
<p>I so far am unable to discover what it is about these modules which is causing this problem. This did not occur in 5.x and earlier 6.x versions of Drupal. <br></p><p><br></p>
<p>Please, please, please help!</p><p><br></p><p>-ron<br></p><p><br></p></div></body></html>