On my project, I have a custom table for some custom permissions for users. I want all permissions for a user loaded on each page like
$user. I created a custom module and set the global variable
hook_init() which contains all custom permissions for current logged in user.
These values are available on site pages but I am not sure it is good to use
hook_init() to set global data. Is there any proper method?