[development] Can I Indicate failure from hook_user?
FGM
fgm at osinet.fr
Wed Sep 3 09:38:54 UTC 2008
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.
----- 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
More information about the development
mailing list