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());
   }