LDAP backed Gravatar support

RhodeCode can use Gravatar URLs to retrieve the avatars of users. This is nice, but if you are using LDAP authentication like I do, you certainly want RhodeCode to also retrieve these avatars from LDAP instead of a third party service.

RhodeCode does not support LDAP-backed avatars natively, but it is possible to setup a bridge that does exactly that. I just setup such a bridge on my own instance, and it’s working great!

I installed Lavatar on the same server as RhodeCode. I just followed the instructions from the Readme to run this small http service, and I also applied the two pull requests that are still pending on the GitHub repo. I then exposed this http service to the outside world in my Apache config, using the same hostname but a different port than RhodeCode itself. In RhodeCode, I only had to change the Gravatar URL to {scheme}://{netloc}:488/avatar/{md5email}?d=mm&s={size}&m=thumbnail to make it work.

It would be great if this integration was native to RhodeCode, but at least it is possible right now without too much effort thanks to the Gravatar support.