I’m doing this to render a node and returning the output to an AJAX call and displaying a node inline on a page:
$node = node_load($nid);
$node_view = node_view($node);
echo drupal_render($node_view);
I need to be able to do the same things for a user profile…is it similar?
It’s pretty similar, you can use the following functions:
EDIT
I changed the variable name to use
$accountinstead of$user, just to eliminate the possibility of overwriting the global$uservariable.