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) <<a href="mailto:drupal.beginner@wechange.org">
drupal.beginner@wechange.org</a>>:</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>> Augustin (Beginner) wrote:<br>> > On Wednesday 13 September 2006 08:24 pm, Gerhard Killesreiter wrote:<br>> >> A brute force method is to unset the form and redirect elsewhere in<br>> >> hook_form_alter if you are processing your node form and uid == 1.
<br>> ><br>> > thanks Gerhard,<br>> > I'll try that.<br>><br>> You'll also need to exit() after the redirect or the form would still be<br>> 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, &$form) {<br> if ($form_id == 'demexp_question_node_form') {
<br> drupal_goto('<front>');<br> die('forbidden');<br> }<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>