diff --git a/.releaserc b/.releaserc
index a8a9deb..b58cdd4 100644
--- a/.releaserc
+++ b/.releaserc
@@ -9,7 +9,7 @@
[
"@terrestris/maven-semantic-release",
{
- "mavenTarget": "install",
+ "mavenTarget": "deploy",
"clean": false,
"updateSnapshotVersion": true,
"settingsPath": "/home/runner/.m2/settings.xml",
diff --git a/pom.xml b/pom.xml
index 2c0de7b..7ff093d 100755
--- a/pom.xml
+++ b/pom.xml
@@ -52,6 +52,13 @@
17
+
+ maven-deploy-plugin
+ 3.1.3
+
+ true
+
+
diff --git a/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java b/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java
index 4659183..b14fc3e 100755
--- a/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java
+++ b/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java
@@ -71,9 +71,11 @@ protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event,
String username = getJsonProperty(profile, "username");
String discriminator = getJsonProperty(profile, "discriminator");
- if (!discriminator.equals("0")) {
- username = username + "#" + discriminator;
+
+ if (!"0".equals(discriminator)) {
+ username += "#" + discriminator;
}
+
user.setUsername(username);
user.setEmail(getJsonProperty(profile, "email"));
user.setIdp(this);