xprofile_avatar_uploaded and bp_core_fetch_avatar
-
Hi,
I have one problem with fetching avatars using bp_core_fetch_avatar() function and xprofile_avatar_uploaded action. I keep my avatars as user meta. What I want to do is to update that meta every time new avatar is uploaded from back end. I wrote this functions:
function update_avatar_admin(){ update_user_meta(bp_displayed_user_id(),'profile_photo',bp_core_fetch_avatar( array( 'item_id' => bp_displayed_user_id(), 'html' => false ) )); } add_action('xprofile_avatar_uploaded', 'update_avatar_admin', 99);
The thing is it always gets previous avatar and not the one uploaded.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘xprofile_avatar_uploaded and bp_core_fetch_avatar’ is closed to new replies.