Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gravatar: How do I know if a user has a real picture

Tags:

c#

gravatar

I have gotten the gravatar service working on my site. But I would like to know if the user has uploaded their picture or not. Is there a way to know this?

like image 332
Luke101 Avatar asked Jan 20 '10 17:01

Luke101


People also ask

How do I know if my Gravatar exists?

To check whether a Gravatar exists, we'll write a function that can be reused. The function is called validate_gravatar($email) and it takes the e-mailaddress needed to validate as a parameter. The function sends a request to the Gravatar database.

Can you search people on Gravatar?

Gravatar Profile Search – Search for Gravatar by Email If you want to look up your own Gravatar image (or someone else's image), there's a Gravatar profile search feature that lets you look up someone's profile picture by entering their email address.

What is Gravatar profile picture?

A Gravatar is a Globally Recognized Avatar. You upload an image and create your public profile just once, and then when you participate in any Gravatar-enabled site, your Gravatar image and public profile will automatically follow you there. Gravatar is a free service for site owners, developers, and users.

What do people use Gravatar for?

Gravatar stands for Globally Recognised Avatar. It is a web service that allows users to upload a personal online avatar and associate it with their email address. The avatar that is uploaded to the Gravatar website is then called a Gravatar.


1 Answers

When constructing the URL, use the parameter d=404. This will cause Gravatar to return a 404 error rather than an image if the user hasn't set a picture.

If you're using the .Net control linked to from the gravitar site, you'll need to modify the IconSet enumeration (and probably pull the code out of the control, so you can get at the status directly).

like image 189
Andrew Aylett Avatar answered Oct 02 '22 19:10

Andrew Aylett