From 6ed28c8a435164a2d16e224d879d2ae4e2ce77c5 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 8 Oct 2009 02:57:28 +0100 Subject: [PATCH] User::get_avatar_html() --- core/user.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/user.class.php b/core/user.class.php index 86e7bf93..1153324f 100644 --- a/core/user.class.php +++ b/core/user.class.php @@ -124,5 +124,18 @@ class User { $database->Execute("UPDATE users SET email=? WHERE id=?", array($address, $this->id)); log_info("core-user", "Set email for {$this->name}"); } + + /** + * Get a snippet of HTML which will render the user's avatar, be that + * a local file, a remote file, a gravatar, a something else, etc + */ + public function get_avatar_html() { + // FIXME: configurable + if(!empty($this->email)) { + $hash = md5(strtolower($this->email)); + return ""; + } + return ""; + } } ?>