Everett,<br><br>I think if the currently logged in user does not have access to this URL, then the page load will not reach as far as your hook_block() code.<br><br>Although, it is 10:31 pm and I am at the airport after 7 continuous days of Drupaling, so brain is fried (in the microwave).<br>
<br>So better test it with some test code and see if what I said is right or not.<br><br><div class="gmail_quote">On Fri, Apr 23, 2010 at 5:30 PM, E.J. Zufelt <span dir="ltr">&lt;<a href="mailto:lists@zufelt.ca">lists@zufelt.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;">Good afternoon,<div><br></div><div>Thanks, this was quite helpful.</div>
<div><br></div><div>I notice that menu_get_item() will tell me if the current user can access the current menu item.  Is there a simple method to test if user0 can access the current menu item?  That is, regardless who the current user is, I would like to see if there is a function to let me know if user0 can access the current page, essentially a test to see if the current page is available to anonymous users or not.</div>
<div><br></div><div>Thanks again,<div class="im"><br><div>
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">
<div><span style="font-size: medium;"><span style="font-size: 12px;"><div>Everett Zufelt<br></div><div><a href="http://zufelt.ca" target="_blank">http://zufelt.ca</a></div><div><br></div><div>Follow me on Twitter<br><a href="http://twitter.com/ezufelt" target="_blank">http://twitter.com/ezufelt</a><br>
<br>View my LinkedIn Profile<br><a href="http://www.linkedin.com/in/ezufelt" target="_blank">http://www.linkedin.com/in/ezufelt</a></div><div><br></div></span></span></div></div></span></div></span></span><br>
</div>
<br></div><div><div></div><div class="h5"><div><div>On 2010-04-23, at 12:03 PM, Daniel F. Kudwien wrote:</div><br><blockquote type="cite"><div>$_GET[&#39;q&#39;] holds the current, internal system path.<br><br>menu_get_item() provides you the currently active menu router item.<br>
<br>menu_get_object() provides you a dynamic argument context from the menu<br>router item, if any.<br><a href="http://api.drupal.org/api/function/menu_get_object/6" target="_blank">http://api.drupal.org/api/function/menu_get_object/6</a><br>
<br>sun<br><br>________________________________<br><br><span style="white-space: pre;">        </span>From: <a href="mailto:development-bounces@drupal.org" target="_blank">development-bounces@drupal.org</a><br>[mailto:<a href="mailto:development-bounces@drupal.org" target="_blank">development-bounces@drupal.org</a>] On Behalf Of E.J. Zufelt<br>
<span style="white-space: pre;">        </span>Sent: Friday, April 23, 2010 4:49 PM<br><span style="white-space: pre;">        </span>To: <a href="mailto:development@drupal.org" target="_blank">development@drupal.org</a><br><span style="white-space: pre;">        </span>Subject: [development] Blocks and page context<br>
<span style="white-space: pre;">        </span><br><span style="white-space: pre;">        </span><br><span style="white-space: pre;">        </span>Good morning, <br><br><span style="white-space: pre;">        </span>I am building a module and invoking hook_block.  I am wondering if<br>
there is a way for my block to gain some context about the page on which it<br>will be rendered.  Primarily I would like to know if my block can be aware<br>of the URL of the page being displayed (not the http-requested URL in case<br>
they differ), and the access permissions of the page being displayed (not<br>those of the block itself, or of the user accessing the block.<br><br><span style="white-space: pre;">        </span>Thanks,<br><span style="white-space: pre;">        </span><br>
<br><br><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span>Everett Zufelt<br><span style="white-space: pre;">        </span><br>
<span style="white-space: pre;">        </span><a href="http://zufelt.ca" target="_blank">http://zufelt.ca</a><br><br><span style="white-space: pre;">        </span>Follow me on Twitter<br><span style="white-space: pre;">        </span><a href="http://twitter.com/ezufelt" target="_blank">http://twitter.com/ezufelt</a><br>
<span style="white-space: pre;">        </span><br><span style="white-space: pre;">        </span>View my LinkedIn Profile<br><span style="white-space: pre;">        </span><a href="http://www.linkedin.com/in/ezufelt" target="_blank">http://www.linkedin.com/in/ezufelt</a><br>
<br><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span><span style="white-space: pre;">        </span><br><span style="white-space: pre;">        </span><br><br><br><br></div></blockquote></div><br></div></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. --   Leonardo da Vinci<br>