Adapt to changes in Gerrit core

ExternalId.USER_NAME_PATTERN_REGEX was made private. Instead
ExternalId.isValidUsername should be used.

Change-Id: I18467023a1a9bff012e33634b28c6e9892ffe79e
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java b/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java
index 78c7051..a61c851 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/singleusergroup/SingleUserGroup.java
@@ -105,7 +105,7 @@
     AccountState state;
     if (ident.matches(ACCOUNT_ID_PATTERN)) {
       state = accountCache.get(new Account.Id(Integer.parseInt(ident)));
-    } else if (ident.matches(ExternalId.USER_NAME_PATTERN_REGEX)) {
+    } else if (ExternalId.isValidUsername(ident)) {
       state = accountCache.getByUsername(ident);
     } else {
       return null;