Extract and display user infromation on an automatically created page

If I understand your question correctly, you should be able to grab the information you’re after from $the_user.

If you use:

$my_post['post_content'] = print_r($the_user,true);

you should be able to see all the available user information in the page. Once you know exactly what you want, you can echo it out nicely with something like:

$my_post['post_content'] = "Username: ".$the_user->user_login."<br />Roles:".$the_user->roles;

If that’s not quite what you were after let me know!