Question

How would I go about loading my own data onto the $user object upon login of a user?

Was it helpful?

Solution

hook_user() probably has the functionality you need

custommodule_user($op, &$edit, &$account, $category = NULL){
    global $user;
    if($op=='login'){
        $user->custommodule['data']='some stuff';
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top