[development] Can I Indicate failure from hook_user?
pushyamitra at gmail.com
Tue Jul 22 09:46:15 UTC 2008
Ok, cool. Thanks John and Steven!
On Tue, Jul 22, 2008 at 9:39 AM, John Fiala <jcfiala at gmail.com> wrote:
> On Mon, Jul 21, 2008 at 10:03 PM, Pushyamitra Navare
> <pushyamitra at gmail.com> wrote:
>> But can you tell me, is "validate" operation invoked for both "insert"
>> and "update"? If yes, then how do I know in hook_user if it is being
>> called for insert or for update? What parameter of hook_user should I
>> check? I quickly went through documentation but did not find anything.
> Yes, it's called for any modification of the user. It's an insert if
> the $account parameter doesn't have a uid, and it's an update if the
> $account parameter does have a uid.
>> Also, i need such a "validate" hook for "user delete" operation as
>> well. Any way to do that?
> I don't think there is any way - looking at user_delete, it doesn't
> call hook_user until the user is deleted.
> John Fiala
More information about the development