Joined November 2016
·

Rudi Teschner

I would recommend to not use the init hook for that. If you look at https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_init/7.x you can see that this hook is called for every uncached page request. This logic should just be called on installing your module, so hookenable() or hookinstall() would probably be a better choice.

Achievements
1 Karma
0 Total ProTip Views