Adding more information onto the $user object in drupal?
-
05-07-2019 - |
Question
How would I go about loading my own data onto the $user object upon login of a user?
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