<div dir="ltr">On Wed, Sep 3, 2008 at 3:08 PM, FGM <span dir="ltr">&lt;<a href="mailto:fgm@osinet.fr">fgm@osinet.fr</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think you can make sure of this by defining the weight of your module as &gt; 0. It will then be invoked after all core modules and all contrib modules with lower weights. See includes/module.inc#module_list to see how Drupal builds and orders the list of modules invoked in a module_invoke_all call.<br>

</blockquote><div><br>Cool! Much simpler than I thought.<br><br>Looking at code in module.inc I can see that one way to adjust weight is by changing value in system table in database. Just to confirm, is there other way to change weight for a module (like defining weight in <a href="http://module.info">module.info</a> file etc.)?<br>
<br clear="all">- Pushya<br>
<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
----- Original Message ----- From: &quot;Pushyamitra Navare&quot; &lt;<a href="mailto:pushyamitra@gmail.com" target="_blank">pushyamitra@gmail.com</a>&gt;<br>
To: &lt;<a href="mailto:development@drupal.org" target="_blank">development@drupal.org</a>&gt;<br>
Sent: Wednesday, September 03, 2008 11:25 AM<br>
Subject: Re: [development] Can I Indicate failure from hook_user?<br>
<br>
<br>
Hello there,<div><div></div><div class="Wj3C7c"><br>
<br>
On Mon, Jul 21, 2008 at 3:53 PM, Steven Jones &lt;<a href="mailto:darthsteven@gmail.com" target="_blank">darthsteven@gmail.com</a>&lt;mailto:<a href="mailto:darthsteven@gmail.com" target="_blank">darthsteven@gmail.com</a>&gt;&gt; wrote:<br>

Always good to see someone new to Drupal.<br>
<br>
You&#39;ll probably want to do something with the $op == &quot;validate&quot;<br>
argument of hook_user. Throw an error if you don&#39;t want the<br>
update/insert to continue.<br>
<br>
<br>
I am back with a question related to this.<br>
<br>
What is order in which hooks are called? For e.g. let&#39;s say there&#39;s a captcha module. Now as I see on my machine, hook_user is called first. After that, validation of captcha happens.<br>
<br>
Is there any way I can control the sequence in which validations occur? What I want to do is, after all other modules have done their validations and everything is ok, only then should my function be called, in the end. My validation function should be final validation function. Is there any way to do it?<br>

<br>
Any help on this appreciated. Any document which explains how actually hooks are called would help too.<br>
<br>
Thanks, Pushya<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>