Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Script [Closed] How to call the custom WPForo avatar in the frontend?

4 Posts
2 Users
0 Reactions
1,351 Views
Posts: 15
Topic starter
(@lucasvlc)
Active Member
Joined: 4 years ago

Hello, I'd like to know what is the name of the custom field used as an avatar for users. I need to call it in a different page and I don't know the name.... thanks in advance

3 Replies
Chris
Posts: 3611
(@chris)
Famed Member
Joined: 4 years ago

Hi @lucasvlc,

wpForo is well integrated with WordPress, and if you Enable Replace Author Avatar with Forum Profile Avatar from Dashboard > Forums > Settings > Features you can call Avatars using the below WordPress Function code:

get_avatar( mixed $id_or_email, int $size = 96, string $default = '', string $alt = '', array $args = null )
Posts: 15
Topic starter
(@lucasvlc)
Active Member
Joined: 4 years ago

Ok, but I need to change the avatar from a form in the account page... I am building a dashboard and it has a form where user can update the data from his profile. For this I need to know where is the avatar data managed by WPForo saved...

1 Reply
Chris
(@chris)
Joined: 4 years ago

Famed Member
Posts: 3611

@lucasvlc,

prefix_wpforo_profiles > avatar column.

You need to reset wpForo User Cache after the Data update. Call the below php funtion to reset wpForo User Cache:

WPF()->member->reset( $userid );