diff --git a/core/user.class.php b/core/user.class.php
index 1153324f..febfc289 100644
--- a/core/user.class.php
+++ b/core/user.class.php
@@ -131,9 +131,13 @@ class User {
*/
public function get_avatar_html() {
// FIXME: configurable
- if(!empty($this->email)) {
- $hash = md5(strtolower($this->email));
- return "
";
+ global $config;
+ if($config->get_string("avatar_host") == "gravatar") {
+ if(!empty($this->email)) {
+ $hash = md5(strtolower($this->email));
+ $args = $config->get_string("avatar_gravatar_options");
+ return "
";
+ }
}
return "";
}
diff --git a/ext/user/main.php b/ext/user/main.php
index e14675e2..dec2e894 100644
--- a/ext/user/main.php
+++ b/ext/user/main.php
@@ -44,6 +44,8 @@ class UserPage extends SimpleExtension {
global $config;
$config->set_default_bool("login_signup_enabled", true);
$config->set_default_int("login_memory", 365);
+ $config->set_default_string("avatar_host", "gravatar");
+ $config->set_default_string("avatar_gravatar_options", "");
}
public function onPageRequest(Event $event) {