1 opmama May 02, 2006 07:22
3 opmama May 16, 2006 08:08
Sorry, computer died and it took a while to get back here. I appreciate the reply, but it looks like this gives me the user info for the currently logged in user? What I want is for under the blog description, to show some of the user variables (but I want it to be the same for everyone viewing this page). How do I reference the user info related to the blog I am currently viewing?
(You may well have answered this and the problem is my lack of skill!)
Hi,
I will answer for v0.9.1 in which you have 2 functions for what you want to do.
The first one is useful if you want to store some user information in another php variable:
It returns the user variable you asked for in $show, for the user $this_userdata (default is the current user, so you may not use this parameter).
An exemple storing current user's nickname:
Possible values are:
ID num_posts level firstname lastname nickname idmode email url icq aim msn yim notify locale login[/list:u] The second one is made for displaying (or at least formatting) the content you ask for and may be more attractive to you:
It calls get_user_info to get what you want (use $show to tell this) and format_to_output() to format it (using $format, for sidebar display you may want to use 'htmlbody'), and actually display or only return it according to $display (true by default, you might not use it). The closest and simplest exemple for what you want to do may be using this function and looking like: If you want further documentation you should look in b2evocore/_functions_users.php or here: http://doc.b2evolution.net/v-0-9/evocore/_b2evocore__functions_users_php.html