I've learned that one should never call die/exit, since some functions will not be executed then (e.g. footer functions etc).<br><br><div><span class="gmail_quote">2006/9/13, Augustin (Beginner) &lt;<a href="mailto:drupal.beginner@wechange.org">
drupal.beginner@wechange.org</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Wednesday 13 September 2006 08:53 pm, Gerhard Killesreiter wrote:
<br>&gt; Augustin (Beginner) wrote:<br>&gt; &gt; On Wednesday 13 September 2006 08:24 pm, Gerhard Killesreiter wrote:<br>&gt; &gt;&gt; A brute force method is to unset the form and redirect elsewhere in<br>&gt; &gt;&gt; hook_form_alter if you are processing your node form and uid == 1.
<br>&gt; &gt;<br>&gt; &gt; thanks Gerhard,<br>&gt; &gt; I'll try that.<br>&gt;<br>&gt; You'll also need to exit() after the redirect or the form would still be<br>&gt; generated, IIRC.<br><br>Apparently, it's not necessary. I did the quick test below, and die() doesn't
<br>get executed, but if I add a drupal_set_message() to the redirect, then I<br>have something that is good enough for my purposes.<br><br>function demexp_form_alter($form_id, &amp;$form) {<br>&nbsp;&nbsp;if ($form_id == 'demexp_question_node_form') {
<br>&nbsp;&nbsp;&nbsp;&nbsp;drupal_goto('&lt;front&gt;');<br>&nbsp;&nbsp;&nbsp;&nbsp;die('forbidden');<br>&nbsp;&nbsp;}<br>}<br><br>thanks,<br><br>A.<br><br><br>--<br><a href="http://www.wechange.org/">http://www.wechange.org/</a><br>Because we and the world need to change.
<br><br><a href="http://www.reuniting.info/">http://www.reuniting.info/</a><br>Intimate Relationships, peace and harmony in the couple.<br></blockquote></div><br>