Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Override WordPress avatars" option doesn't appear to work with comments #355

Closed
thameera opened this issue Dec 11, 2017 · 2 comments
Closed
Assignees
Milestone

Comments

@thameera
Copy link
Contributor

Even when the "Override WordPress avatars" in the Features tab is turned on, the picture for the comments section, etc still seem to use Gravatar instead of user's picture. However the user's profile page (in admin panel) shows the correct picture.

@howarddc
Copy link

Here's the fix:

/plugins/auth0/WP_Auth0.php Line 160, add:

if (is_object($id_or_email) && isset($id_or_email->user_id)) $id_or_email=$id_or_email->user_id;

The issue is that the comments version of this filter sends the full WP_Comment object as the second param to get_avatar, and the code was assuming it would always be an integer user ID. Instead, the user ID is a property of the object.

@joshcanhelp joshcanhelp self-assigned this Jan 22, 2018
@joshcanhelp
Copy link
Contributor

From /wp-includes/pluggable.php L:2550:

"The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, user email, WP_User object, WP_Post object, or WP_Comment object."

Assigning to myself to address in the next next release.

@joshcanhelp joshcanhelp added bug and removed CH: Fixed labels Jan 24, 2018
@joshcanhelp joshcanhelp added this to the v3-Next milestone Jan 25, 2018
joshcanhelp added a commit that referenced this issue Jan 25, 2018
…s besides a user ID (WP_User, WP_Comment, WP_Post, email); fixes #355
joshcanhelp added a commit that referenced this issue Jan 25, 2018
…s besides a user ID (WP_User, WP_Comment, WP_Post, email); fixes #355
joshcanhelp added a commit that referenced this issue Jan 26, 2018
…s besides a user ID (WP_User, WP_Comment, WP_Post, email); fixes #355
joshcanhelp added a commit that referenced this issue Jan 29, 2018
…s besides a user ID (WP_User, WP_Comment, WP_Post, email); fixes #355
joshcanhelp added a commit that referenced this issue Jan 29, 2018
…s besides a user ID (WP_User, WP_Comment, WP_Post, email); fixes #355
joshcanhelp added a commit that referenced this issue Feb 28, 2018
…s besides a user ID (WP_User, WP_Comment, WP_Post, email); fixes #355
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants