From fa86542f90774d7a7d8f3e81ee35821ca25b7fd4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 18 Mar 2016 23:06:32 -0400 Subject: Added pluggable Avatar providers --- app/User/Avatar/GravatarProvider.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/User/Avatar/GravatarProvider.php (limited to 'app/User') diff --git a/app/User/Avatar/GravatarProvider.php b/app/User/Avatar/GravatarProvider.php new file mode 100644 index 00000000..10ab4390 --- /dev/null +++ b/app/User/Avatar/GravatarProvider.php @@ -0,0 +1,35 @@ +helper->text->e($user['name'] ?: $user['username']); + return ''.$title.''; + } + + /** + * Determine if the provider is active + * + * @access public + * @param array $user + * @return boolean + */ + public function isActive(array $user) + { + return !empty($user['email']) && $this->config->get('integration_gravatar') == 1; + } +} -- cgit v1.2.3