Hello,
I am looking for someone familiar with gravity forms and the user registration add-on to help me.
I have a user registration form that maps every field into the profile for a new Buddypress sign up successfully. What I am unable to find a solution to is how to get the 'file upload' field to work with Buddypress avatars.
When a user uploads an avatar it currently just stores the link in a custom meta. I need to be able to make it so that when a user uploads their avatar on the registration form the avatar is then displayed in the members Buddypress profile.
I hope to achieve this by using the various hooks and functions built into Buddypress like bp_displayed_user_avatar.
I am hoping someone can provide me details on how to setup the functionality as mentioned above.
Many Thanks
Hariprasad Vijayan answers:
Hello,
Try something like this
<?php
// Following code will replace buddypress bp_displayed_user_avatar(). Add it in function.php of theme
add_filter('bp_displayed_user_avatar', 'custom_function_to_display_image', 10, 4);
// Callback function
function custom_function_to_display_image($args)
{
// Code for displaying gravity form image for a specific user
}
// $args : (Customize the values according to your need.)
?>
Checkout the following link for further reference
http://codex.wordpress.org/Function_Reference/add_filter
Hope this will help you...