aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2015-09-23 18:45:15 +0200
committerJakub Senko <jakubsenko@gmail.com>2015-09-23 18:45:15 +0200
commitd5f625382b3162e4f661138ad9b1f0d0ca8de335 (patch)
tree81b0d0ce697f4d0fc7fb23a616e7861cf27c3f19 /phpBB/phpbb
parent7e379c4cea5452dad81adbc508b205badf49d25f (diff)
downloadforums-d5f625382b3162e4f661138ad9b1f0d0ca8de335.tar
forums-d5f625382b3162e4f661138ad9b1f0d0ca8de335.tar.gz
forums-d5f625382b3162e4f661138ad9b1f0d0ca8de335.tar.bz2
forums-d5f625382b3162e4f661138ad9b1f0d0ca8de335.tar.xz
forums-d5f625382b3162e4f661138ad9b1f0d0ca8de335.zip
[ticket/14191] Add core.get_gravatar_url_after event
PHPBB3-14191
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/avatar/driver/gravatar.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php
index 2082e0fd02..bb4977c30c 100644
--- a/phpBB/phpbb/avatar/driver/gravatar.php
+++ b/phpBB/phpbb/avatar/driver/gravatar.php
@@ -172,6 +172,8 @@ class gravatar extends \phpbb\avatar\driver\driver
*/
protected function get_gravatar_url($row)
{
+ global $phpbb_dispatcher;
+
$url = self::GRAVATAR_URL;
$url .= md5(strtolower(trim($row['avatar'])));
@@ -180,6 +182,17 @@ class gravatar extends \phpbb\avatar\driver\driver
$url .= '?s=' . max($row['avatar_width'], $row['avatar_height']);
}
+ /**
+ * Modify gravatar url
+ *
+ * @event core.get_gravatar_url_after
+ * @var string row User data or group data
+ * @var string url Gravatar URL
+ * @since 3.1.7-RC1
+ */
+ $vars = array('row', 'url');
+ extract($phpbb_dispatcher->trigger_event('core.get_gravatar_url_after', compact($vars)));
+
return $url;
}
}