Tag Archives: get avatar

Get User’s Avatar

get_user_avatar($user_id, $options)

This function returns the user’s avatar.

Options:

OPTIONS DEFAULT ALTERNATIVES
size 40  any size in pixels
pic_type avatar avatar, mainpicture
size_type fixed fixed, dynamic

Example:

			
global $xoouserultra;
			
//get user avatar
$user_id = get_current_user_id();	
			
$args = array('size' => '40', 'pic_type' => 'avatar' ,  'size_type' => 'fixed');
$avatar = $xoouserultra->api->get_user_avatar($user_id, $args );
			
echo $avatar;