From 14d68a0dc031b271d26e735160651da52b55d562 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 10 Apr 2012 15:33:43 -0700 Subject: [PATCH] set default on get_avatar --- include/network.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/network.php b/include/network.php index 58cef4756d..23ef50b21b 100644 --- a/include/network.php +++ b/include/network.php @@ -694,13 +694,20 @@ function allowed_email($email) { if(! function_exists('avatar_img')) { function avatar_img($email) { + + $a = get_app(); + $avatar['size'] = 175; $avatar['email'] = $email; $avatar['url'] = ''; + $avatar['success'] = false; call_hooks('avatar_lookup', $avatar); - logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url']); + if(! $avatar['success']) + $avatar['url'] = $a->get_baseurl() . '/images/person-175.jpg'; + + logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG); return $avatar['url']; }} -- 2.39.5