commit | 63c16b4afe62c0fe1c93502fc5135bed731689e9 | [log] [tgz] |
---|---|---|
author | Patrick Georgi <pgeorgi@google.com> | Sun Sep 15 17:27:01 2019 +0200 |
committer | Patrick Georgi <pgeorgi@google.com> | Tue Sep 24 12:04:02 2019 +0200 |
tree | 8a1bbee0bc68d43a0bedccd1ffdc1d4046df3f63 | |
parent | e259ac2a2bbad16cf756374b7e57cbaf9c668fc5 [diff] |
Add ${id} template variable that resolves to the account id Change-Id: Ie1a044486a8eb1b3ef328d2b195ed10992872fd0 Signed-off-by: Patrick Georgi <pgeorgi@google.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java index d178c9a..c4c2192 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java +++ b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
@@ -130,6 +130,8 @@ private String fillOutTemplate(String template, IdentifiedUser user) { String workString = replaceInUrl("${user}", template, user.getUserName().orElse(null)); + workString = replaceInUrl("${id}", workString, + Integer.toString(user.getAccountId().get())); return replaceInUrl("${email}", workString, user.getAccount().preferredEmail()); }