Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It'd be really handy if there was a section in the readme that mentions what code we should use in order to display a gravatar in a block or custom module.
Comments
Comment #1
davidneedhamI say that because it'd save me the last hour of trying to figure out how to call it... and I'm still not having any luck. Any tips? I basically just want to display the user's avatar, be it gravatar or one they uploaded in a block.
Thanks in advance!
Comment #2
davidneedhamI'm still trying to figure this out.
How do I display the user's gravitar image? I just need to put it in a block with other code.
Comment #3
Dave ReidSorry I hadn't responded sooner. WIth 6.x-1.7, here's how you get a Gravatar:
The current code that will be 6.x-1.8:
Comment #4
davidneedhamThank you thank you thank you!
Comment #6
Ben Clifford CreditAttribution: Ben Clifford commented"How do I display the user's gravitar image? I just need to put it in a block with other code."
Could you give the code to do this in drupal 7 with Gravatar 7.x-1.1
Thanks in advance.
Comment #7
Narno CreditAttribution: Narno commentedGravatar 7.X:
gravatar_get_gravatar('example@example.com');