Set global data like $user 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 $cperms in 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?
It sounds like you're reinventing the wheel here; as @burnsjeremy mentions, there's already an effective system built into Drupal for storing permissions.

hook_permission() allows any module to define its own custom permissions that can be set per-role. Once implemented, user_access() can be called to check a user for custom permissions.

If you need some data that is more granular (i.e. at the per-user level), the global $user object has an array property called data. $user-&gt;data is loaded/saved with the user object and should always be available to you.