diff --git a/config/services.yaml b/config/services.yaml
index 73dc2984..b5471e22 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -8,6 +8,7 @@ parameters:
locale: 'en' # Set the default language to use her
partdb_title: 'Part-DB' # The title shown inside of Part-DB (e.g. in the navbar and on homepage)
banner: '' # The info text shown in the homepage
+ use_gravatar: true # Set to false, if no Gravatar images should be used for user profiles.
services:
# default configuration for services in *this* file
diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php
new file mode 100644
index 00000000..6819a285
--- /dev/null
+++ b/src/Controller/UserController.php
@@ -0,0 +1,96 @@
+getUser();
+ }
+
+ if($this->getParameter("use_gravatar")) {
+ $avatar = $this->getGravatar($user->getEmail(), 200, 'identicon');
+ } else {
+ $avatar = $packages->getUrl("/img/default_avatar.png");
+ }
+
+
+ return $this->render('Users/user_info.html.twig', [
+ 'user' => $user,
+ 'avatar' => $avatar
+ ]);
+ }
+
+
+ /**
+ * Get either a Gravatar URL or complete image tag for a specified email address.
+ *
+ * @param string $email The email address
+ * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ]
+ * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ]
+ * @param string $r Maximum rating (inclusive) [ g | pg | r | x ]
+ * @param bool $img True to return a complete IMG tag False for just the URL
+ * @param array $atts Optional, additional key/value attributes to include in the IMG tag
+ * @return String containing either just a URL or a complete image tag
+ * @source https://gravatar.com/site/implement/images/php/
+ */
+ public function getGravatar(string $email, int $s = 80, string $d = 'mm', string $r = 'g', bool $img = false, array $atts = array())
+ {
+ $url = 'https://www.gravatar.com/avatar/';
+ $url .= md5(strtolower(trim($email)));
+ $url .= "?s=$s&d=$d&r=$r";
+ if ($img) {
+ $url = ' $val) {
+ $url .= ' ' . $key . '="' . $val . '"';
+ }
+ $url .= ' />';
+ }
+ return $url;
+ }
+
+}
\ No newline at end of file
diff --git a/templates/Users/user_info.html.twig b/templates/Users/user_info.html.twig
new file mode 100644
index 00000000..56505d71
--- /dev/null
+++ b/templates/Users/user_info.html.twig
@@ -0,0 +1,61 @@
+{% extends "main_card.html.twig" %}
+
+{% block title %}{% trans %}user.info.label{% endtrans %}{% endblock %}
+
+{% block card_title %}
+ {% trans %}user.info.label{% endtrans %}{% endblock %}
+
+{% block card_content %}
+
{{ user.firstName }}
+{{ user.lastName }}
+{{ user.email }}
#} + {{ user.email }} +{{ user.department }}
+{{ user.name }}
+TODO
+