Notifications
Clear all

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

4 Posts
2 Users
0 Likes
793 Views
Posts: 15
Topic starter
(@lucasvlc)
Active Member
Joined: 2 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: 3650
(@chris)
Famed Member
Joined: 3 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: 2 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: 3 years ago

Famed Member
Posts: 3650

@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 );