aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-12 11:32:05 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-12 11:32:05 +0200
commit65b13938dbc1d3860e52c836be8cba12303f3729 (patch)
tree1c3d94e2aee17e89133b4c7d739ddb85b916c34a /phpBB/phpbb
parent8c3aa1458c8d423833abe219acf04685e09d2189 (diff)
parentd5f625382b3162e4f661138ad9b1f0d0ca8de335 (diff)
downloadforums-65b13938dbc1d3860e52c836be8cba12303f3729.tar
forums-65b13938dbc1d3860e52c836be8cba12303f3729.tar.gz
forums-65b13938dbc1d3860e52c836be8cba12303f3729.tar.bz2
forums-65b13938dbc1d3860e52c836be8cba12303f3729.tar.xz
forums-65b13938dbc1d3860e52c836be8cba12303f3729.zip
Merge pull request #3925 from Senky/ticket/14191
[ticket/14191] Add core.get_gravatar_url_after event * Senky/ticket/14191: [ticket/14191] Add core.get_gravatar_url_after event
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;
}
}