diff --git a/distribution/modules/lib.xml b/distribution/modules/lib.xml index 1883476f9d..c28dcf883c 100755 --- a/distribution/modules/lib.xml +++ b/distribution/modules/lib.xml @@ -104,7 +104,7 @@ @@ -114,7 +114,7 @@ diff --git a/examples/demo-template/testrealm.json b/examples/demo-template/testrealm.json index 5de75975e3..2d95f9d878 100755 --- a/examples/demo-template/testrealm.json +++ b/examples/demo-template/testrealm.json @@ -15,9 +15,9 @@ { "username" : "bburke@redhat.com", "enabled": true, - "attributes" : { - "email" : "bburke@redhat.com" - }, + "email" : "bburke@redhat.com", + "firstName": "Bill", + "lastName": "Burke", "credentials" : [ { "type" : "password", "value" : "password" } diff --git a/services/src/main/java/org/keycloak/services/managers/RealmManager.java b/services/src/main/java/org/keycloak/services/managers/RealmManager.java index dae9ae3946..ad4b1cba4c 100755 --- a/services/src/main/java/org/keycloak/services/managers/RealmManager.java +++ b/services/src/main/java/org/keycloak/services/managers/RealmManager.java @@ -423,6 +423,8 @@ public class RealmManager { UserModel user = newRealm.addUser(userRep.getUsername()); user.setEnabled(userRep.isEnabled()); user.setEmail(userRep.getEmail()); + user.setFirstName(userRep.getFirstName()); + user.setLastName(userRep.getLastName()); if (userRep.getAttributes() != null) { for (Map.Entry entry : userRep.getAttributes().entrySet()) { user.setAttribute(entry.getKey(), entry.getValue());