Closed (won't fix)
Project:
Bio
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Jan 2007 at 21:28 UTC
Updated:
30 Jan 2007 at 07:15 UTC
I needed to have the bio data in the user object. I did this:
/**
* Implementation of hook_user
* Adds the bio data to the user object
*/
function bio_user($op, &$edit, &$account, $category = NULL){
switch($op){
case 'load':
$account->bio = node_load(bio_for_user($account->uid, true));
break;
}
}
Comments
Comment #1
allie mickaIt's going to be expensive to tack a node_load on top of every user_load, especially since the resulting data will be used pretty infrequently.
Without information on how you're using this code, it's tough to provide an adequate alternative. That said, you can possibly get what you need by using the node_load() in your theme or a helper module.
Thanks!