I have a custom module, in which I want to load some use related data into $_SESSION from the profile.module.
function fps_session_user($op, &$edit, &$account, $category = NULL) {
if ($op == 'login') {
global $user;
profile_load_profile($user);
$_SESSION['branch'] = $user->profile_branch;
watchdog('session', 'User Profile loaded');
}
}
but this never seems to fire. Anyone have any ideas?
are other hooks that you have in the same module working? I’ve had weird issues with the names of the hook functions. Make sure that the module is actually enabled. at the top of the function even before the if statement try a watchdog message there, to simplify as much as possible, see if the hook is even being called.