Statistics: Posted by Cristián Lávaque — April 13th, 2011, 4:51 pm
<?php
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
get_userdatabylogin(get_the_author_login());
(get_the_author_login());
else :
$curauth = get_userdata(intval($author));
endif;
?>
Statistics: Posted by rvlatum — April 13th, 2011, 4:28 pm
<?php get_user_field("city", $user_id); ?>
Statistics: Posted by Jason Caldwell — April 12th, 2011, 9:08 pm
Statistics: Posted by rvlatum — April 12th, 2011, 8:57 pm
<?php
$current_user = wp_get_current_user();
$user_id = $current_user->ID;
?>
<?php
$user = new WP_User("johndoe22");
$user_id = $user->ID;
?>
<?php
foreach(get_users("role=s2member_level1") as $user)
$user_id = $user->ID;
?>
Statistics: Posted by Jason Caldwell — April 12th, 2011, 8:43 pm
<?php global $current_user; get_currentuserinfo(); echo $curauth->display_name; ?>
Statistics: Posted by rvlatum — April 12th, 2011, 10:57 am
get_user_field('city', 23); // 23 is the user's ID.
Statistics: Posted by Cristián Lávaque — April 12th, 2011, 10:50 am
Statistics: Posted by rvlatum — April 12th, 2011, 9:53 am
/*
Retrieves a Custom Field value.
$field_id - required argument.
$user_id - defaults to current user.
*/
if (!function_exists ("get_user_field"))
{
function get_user_field ($field_id = FALSE, $user_id = FALSE)
{
return c_ws_plugin__s2member_utils_users::get_user_field ($field_id, $user_id);
}
}
Statistics: Posted by Cristián Lávaque — April 12th, 2011, 3:07 am
<?php echo get_user_field("city"); ?>
<?php echo get_current_user_field("city,"); ?>
Statistics: Posted by rvlatum — April 11th, 2011, 8:04 pm