aboutsummaryrefslogtreecommitdiffstats
path: root/mod/register.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2012-04-08 23:20:31 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2012-04-09 21:22:09 +0200
commit1f9fe8b5eeebfb6bc1275cba7dbb4daac1a2e910 (patch)
tree422051d2f57a2fb1be7be3cac9fef274d062d819 /mod/register.php
parent93ffba58cc10fc793821ba16de88cdfb271ea5b8 (diff)
downloadvolse-hubzilla-1f9fe8b5eeebfb6bc1275cba7dbb4daac1a2e910.tar.gz
volse-hubzilla-1f9fe8b5eeebfb6bc1275cba7dbb4daac1a2e910.tar.bz2
volse-hubzilla-1f9fe8b5eeebfb6bc1275cba7dbb4daac1a2e910.zip
Remove Gravatar from core and add new hook avatar_lookup.
This patch removes all occurances of Gravatar from friendica's core and adds a new hook "avatar_lookup" inside the function avatar_img($email) where the new *avatar-plugins should hook in. I haven't touched the language files yet. Are they updated automatically somehow?
Diffstat (limited to 'mod/register.php')
-rw-r--r--mod/register.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/mod/register.php b/mod/register.php
index 8812ebadb..b60707d45 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -314,17 +314,13 @@ function register_post(&$a) {
}
- $use_gravatar = ((get_config('system','no_gravatar')) ? false : true);
-
- // if we have an openid photo use it.
- // otherwise unless it is disabled, use gravatar
-
- if($use_gravatar || strlen($photo)) {
+ // if we have no OpenID photo try to look up an avatar
+ if(! strlen($photo))
+ $photo = avatar_img($email);
+ // unless there is no avatar-plugin loaded
+ if(strlen($photo)) {
require_once('include/Photo.php');
-
- if(($use_gravatar) && (! strlen($photo)))
- $photo = avatar_img($email);
$photo_failure = false;
$filename = basename($photo);