aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-10 15:28:48 -0700
committerfriendica <info@friendica.com>2012-04-10 15:28:48 -0700
commit3c66816938bdc97490dee52e98433164aa9f81a7 (patch)
treec7c0e189018703459d8b699e6d2d773696eba547 /include/network.php
parent35b978bb1e5a935d99015098029f2ed29ff07498 (diff)
parent1f9fe8b5eeebfb6bc1275cba7dbb4daac1a2e910 (diff)
downloadvolse-hubzilla-3c66816938bdc97490dee52e98433164aa9f81a7.tar.gz
volse-hubzilla-3c66816938bdc97490dee52e98433164aa9f81a7.tar.bz2
volse-hubzilla-3c66816938bdc97490dee52e98433164aa9f81a7.zip
Merge branch 'libravatar' of https://github.com/dawnbreak/friendica into pull
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/network.php b/include/network.php
index 38d0980d5..58cef4756 100644
--- a/include/network.php
+++ b/include/network.php
@@ -692,18 +692,16 @@ function allowed_email($email) {
}}
-if(! function_exists('gravatar_img')) {
-function gravatar_img($email) {
- $size = 175;
- $opt = 'identicon'; // psuedo-random geometric pattern if not found
- $rating = 'pg';
- $hash = md5(trim(strtolower($email)));
-
- $url = 'http://www.gravatar.com/avatar/' . $hash . '.jpg'
- . '?s=' . $size . '&d=' . $opt . '&r=' . $rating;
+if(! function_exists('avatar_img')) {
+function avatar_img($email) {
+ $avatar['size'] = 175;
+ $avatar['email'] = $email;
+ $avatar['url'] = '';
+
+ call_hooks('avatar_lookup', $avatar);
- logger('gravatar: ' . $email . ' ' . $url);
- return $url;
+ logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url']);
+ return $avatar['url'];
}}