anubhav94 / team-piazza

Automatically exported from code.google.com/p/team-piazza
GNU General Public License v3.0
0 stars 0 forks source link

Add support for gravatar #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Now that users can (have to) configure their image URLs, I think it makes sense 
that an admin can configure a server-wide default to use gravatar. This uses 
the md5 of the user's email address. 

Ex: 
http://www.gravatar.com/avatar/f04729a75b927c0d0657b92857c0482a?s=50&d=identicon

I used to just set this in main-config for everyone.

Original issue reported on code.google.com by gro...@gmail.com on 13 Mar 2012 at 8:53

GoogleCodeExporter commented 9 years ago
Workaround to mass update all users with a gravatar URL:

INSERT INTO user_property 
    SELECT
        id, 'plugin:notificator:piazza:userImage', 
        'http://www.gravatar.com/avatar/' + substring(master.sys.fn_varbintohexstr(HASHBYTES('md5',lower(email))),3,32) + '?s=50&d=identicon'
    FROM [users]
    LEFT JOIN user_property ON users.ID = user_property.user_id AND user_property.key1 = 'plugin:notificator:piazza:userImage'
    WHERE user_property.value IS NULL

I still consider this issue valid. There are way too many dev tools already 
that have their own internal profiles/user images, and this just contributes to 
the problem.

Original comment by gro...@gmail.com on 13 Mar 2012 at 9:00

GoogleCodeExporter commented 9 years ago
You are right. We should add support for gravatar.

In the meantime, you could put the URL to the gravatar image into the 
notifications configuration.

Original comment by timomeinen on 13 Apr 2012 at 8:35

GoogleCodeExporter commented 9 years ago

Original comment by timomeinen on 20 Oct 2013 at 4:05

GoogleCodeExporter commented 9 years ago
The new release piazza-20132010181251 supports Gravatar. The logic is as 
follows:

- if the user leaves the profile-url field empty, the users email address will 
be used to get the Gravatar image
- if the field is empty and the user does not have a Gravatar a default 
gravatar icon is rendered based on the email adress

Original comment by timomeinen on 20 Oct 2013 at 4:17