By jadowd on
Hi there...
Does anyone out there know how to make my use of hook_user execute last, after all other modules implementation of hook_user is executed? I can't seem to find that, and I believe that there is a way.
Thanks,
Hi there...
Does anyone out there know how to make my use of hook_user execute last, after all other modules implementation of hook_user is executed? I can't seem to find that, and I believe that there is a way.
Thanks,
Comments
Hi, in {system} table,
Hi,
in {system} table, search the entry that corresponds to your module (has the filename like your module name) and assign a weight bigger than any other weight in that table. This will result in your module being called the last time for every hook, not only hook_user.
Vasi.
yeah... I tried that and it
yeah... I tried that and it didn't work. I am using ubercart, and the uc_cart_user hook was getting called before my hook. I bumped up the weight to 1000 while the module that I am competing with, which is set to 0... I now have a system hog hack in place to rectify this... what gives?
This worked fine for me, but
This worked fine for me, but it would be better if there was reordering on a more granular level, i.e. hooks within modules, rather than a blanket configuration that EVERY hook in my module will be called later if I increase the weight.
Actually I've just seen a new
Actually I've just seen a new post regarding a Drupal 7 hook which apparently allows this:
http://lionide.wordpress.com/2010/12/06/drupal-7-hook-execution-order/