[development] Can I Indicate failure from hook_user?
pushyamitra at gmail.com
Wed Sep 3 11:47:21 UTC 2008
On Wed, Sep 3, 2008 at 3:08 PM, FGM <fgm at osinet.fr> wrote:
> I think you can make sure of this by defining the weight of your module as
> > 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.
Cool! Much simpler than I thought.
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 module.info file
> ----- Original Message ----- From: "Pushyamitra Navare" <
> pushyamitra at gmail.com>
> To: <development at drupal.org>
> Sent: Wednesday, September 03, 2008 11:25 AM
> Subject: Re: [development] Can I Indicate failure from hook_user?
> Hello there,
> On Mon, Jul 21, 2008 at 3:53 PM, Steven Jones <darthsteven at gmail.com
> <mailto:darthsteven at gmail.com>> wrote:
> Always good to see someone new to Drupal.
> You'll probably want to do something with the $op == "validate"
> argument of hook_user. Throw an error if you don't want the
> update/insert to continue.
> I am back with a question related to this.
> What is order in which hooks are called? For e.g. let's say there's a
> captcha module. Now as I see on my machine, hook_user is called first. After
> that, validation of captcha happens.
> 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?
> Any help on this appreciated. Any document which explains how actually
> hooks are called would help too.
> Thanks, Pushya
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development