Home Forums Plugin Support WP User Frontend Pro determining if avatar exists

This topic is: resolved

This topic contains 5 replies, has 3 voices, and was last updated by  Tareq Hasan 6 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1433

    cheekyboots
    Participant
    Post count: 7

    You guys must be doing something to make the get_avatar return a local avatar rather than just gravatar, right?

    I need to determine if there is an avatar available for a user – either a gravatar or a local avatar. Is there a way to do that?

    #1435

    Mahi
    Member
    Post count: 1555

    Helo cheekyboots,

    We are not doing anything here 🙂 . The profile image is displayed by the standard get_avatar() function, provided by WordPress.

    #1437

    cheekyboots
    Participant
    Post count: 7

    No. get_avatar() by itself only returns gravatars.

    Never mind, I searched your codebase. You are filtering get_avatar() in the wpuf-functions.php file on line 553 so it uses wpuf_get_avatar to look for a local avatar first.

    #1438

    Mahi
    Member
    Post count: 1555

    WordPress by default shows image using Gravatar .

    In registration form settings option their is a profile field – Avatar .

    By default, wpuf plugin try to get this Avatar (if its been using or not) , then try to get Gravatar .

    Cheers.

    #1439

    cheekyboots
    Participant
    Post count: 7

    Yes, I just said that.

    #1441

    Tareq Hasan
    Keymaster
    Post count: 2831

    Yeah, you are right. It's filtering the get_avatar function. I am looking for a custom field user_avatar, if it exists, I am showing the local avatar.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘determining if avatar exists’ is closed to new replies.